Programmatically convert XPS to TXT in Java & J2SE applications using flexible document manipulation options to customize the resultant document. Convert the complete document or some specific pages based on page numbers or selective page ranges using Java XPS to TXT conversion library.
DownloadPerform XPS to TXT file conversion in Java using three simple steps. View the converted document as HTML without any external software dependency.
// Supported file formats: https://docs.groupdocs.com/conversion/java/supported-document-formats/ | |
Converter converter = new Converter("input.docx"); | |
ConvertOptions convertOptions = new FileType().fromExtension("pdf").getConvertOptions(); | |
converter.convert("output.pdf", convertOptions); | |
try (Viewer viewer = new Viewer("output.pdf")) | |
{ | |
HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources("output{0}.html"); | |
viewer.view(viewOptions); | |
} |
Accurately load and convert documents that are protected with a password within your Java based applications. The file format conversion API also supports rendering remote documents from different sources including S3, Blob, FTP, Stream, URL or a local disk.
The documents information extraction feature not only allows getting the basic information about the source document file but it also supports extracting some valuable file-format specific information such as project start and end dates of a Microsoft Project file, any printing restrictions on a PDF document, list of folders enclosed in an Outlook data file etc.
Convert popular document file formats on different operating systems such as Windows, Linux or macOS while using development environments such as NetBeans, IntelliJ IDEA and Eclipse.
// Supported file formats: https://docs.groupdocs.com/conversion/java/supported-document-formats/ | |
WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions(); | |
loadOptions.setPassword("12345"); | |
Converter converter = new Converter("input.docx", loadOptions); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
converter.convert("output.pdf, options); |
Java document conversion API allows you to choose selected pages from the source document and accurately convert to the supported document format. The code example below shows how to convert the 1st and 4th pages of a Word document to the resultant PDF file.
In some cases, the converted document size is bigger and it takes time to be converted. The document conversion library offers the caching feature to efficiently manage such situations and speed up the repetitive conversion process. Enable the ICache interface to work with custom cache implementation using the extension point and control the cache conversion, as you prefer.
The conversion result is saved to the local drive by default but any type of cache storage can be supported by implementing the appropriate interfaces such as Amazon S3, Dropbox, Google Drive, Windows Azure, Reddis or any other.
// Supported file formats: https://docs.groupdocs.com/conversion/java/supported-document-formats/ | |
Converter converter = new Converter("input.docx"); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
options.setPages(Arrays.asList( 1, 4)); | |
converter.convert("output.pdf", options); |
XPS stands for XML Paper Specification and is a type of file format developed by Microsoft. It is an open standard for fixed-layout documents and is an alternative to Adobe’s PDF file format. XPS files are designed to be a simpler format than PDF, allowing greater compatibility with a range of operating systems and devices. XPS files are structured documents, meaning they are composed of multiple parts such as metadata, content and layout. This makes them easier to display and print across different operating systems. XPS is commonly used to store print function settings, so documents maintain a constant appearance regardless of the device that prints them. The XPS file format is also popular in document archiving, as it is less likely to become corrupted than other file formats. It also supports advanced features such as encryption and digital signature, allowing documents to be securely shared and transmitted. In recent years, XPS has become less popular, as the PDF format has become more widely adopted. However, it remains an important document format for businesses and organizations, as it provides greater stability and control over document integrity.
LearnThe TXT file format is a plain text format that is commonly used for storing and sharing text or data files. It is an ideal format for storing text and for sharing information, as it is a very basic, platform-independent file format. TXT files can be opened with any text editing program, such as Notepad or WordPad on Windows, and TextEdit on Macs. They can also be opened with any web browser. TXT files are human-readable and can contain plain text, simple text formatting, and hyperlinks. TXT files are mainly used to store notes, source code, and other small bits of information. They are also used to store HTML files, as they can easily be converted to HTML format. TXT files are often used to store configuration settings, readme files (text files included with software that describe how to use the program), and data files. TXT files have the advantage of being small and lightweight, and can be quickly opened and read. However, they do not support rich text formatting, which means that formatting such as italics, bolding, and fonts cannot be used. Additionally, TXT files cannot store images or other types of multimedia.
Learn(Portable Document Format)
(Office 2007+ Word Document)
(Microsoft Word Template Files)
(Microsoft Word Template File )
(Microsoft Word 2007+ Template File)
(Text Document)
(Rich Text Format)
(Hyper Text Markup Language)
(Web Page Archive Format)
(Microsoft Excel Spreadsheet (Legacy))
(Open XML Workbook)
(Macro-enabled Spreadsheet)
(Excel 97 - 2003 Template)
(Excel Template)
(Excel Macro-Enabled Template)
(Data Interchange Format)
(Microsoft PowerPoint 97-2003)
(Open XML presentation Format)
(PowerPoint Slide Show)
(PowerPoint Slide Show)
(Microsoft PowerPoint Template Files)
(Microsoft PowerPoint Template Presentation)
(Microsoft PowerPoint Template File)
(OpenDocument Text File Format)
(OpenDocument Standard Format)
(Windows Compressed Enhanced Metafile)
(Compressed Windows Metafile)
(Compressed Scalable Vector Graphics)
(LaTeX Source Document)
(DICOM Image)
(Windows Metafile)
(Bitmap Image File)
(Portable Network Graphic)
(Graphical Interchange Format)
(Joint Photographic Expert Group Image)
(Tagged Image File Format)