New in 2022. When converting Excel worksheet to PDF or to images (Tiff, jpg, etc), jOfficeConvert will use by default the paper size and orientation defined in Excel spreadsheet for the output PDF page size and orientation. It is possible to overwrite the 2 page properties using the ExcelConvertOptions. Here is some sample Java code […]
Category: jOfficeConvert: Convert MS Word To PDF, Convert Excel to PDF
Developer library to convert Microsoft Word documents and Excel spreadsheets to PDF in Java.
Windows Font Substitutes for Linux When Converting Microsoft Documents to PDF
When running our library jOfficeConvert to convert Word, Excel or PowerPoint documents to PDF, some of the Microsoft Windows fonts may be missing on the machine when running on Linux or Unix servers. We have done some research to identify good substitution fonts and have implemented a mechanism to specify font substitutes within our library. […]
Debug embedded font option when converting Word Excel Powerpoint to PDF
When jOfficeConvert is set to embed fonts, we will attempt to find the best matching font file available on the system. Sometimes we can’t always find the best match and alternatives will be used. To obtain more detailed logging on the process and details for each attempt to find a matching font turn on the […]
Compress images / reduce DPI resolution when converting Word documents to PDF
Find below sample Java code to convert Word document to PDF and compress images to reduce the DPI resolution to 150 DPI suing Qoppa’s PDF library jOfficeConvert. Images from the original Word document that have a resolution higher than 150 will be resized down to 150 DPI in the resulting PDF document. Other images will […]
Write each Excel worksheet to a separate PDF
This Java sample uses Qoppa’s PDF conversion library jOfficeConvert to convert each worksheet of a Microsoft Excel workbook to a PDF document, using the worksheet name as the PDF file name. // Load the document ExcelDocument ed = new ExcelDocument("C:\\test\\input.xlsx", new ExcelConvertOptions()); List<String> workSheetNames = ed.getWorkSheetNames(); for (String name : workSheetNames) { List<String> namesList […]
Converting an Excel Worksheet to PDF
This Java sample uses Qoppa’s PDF conversion library jOfficeConvert to convert the first worksheet from a Microsoft Excel workbook to PDF. // Load the document ExcelDocument ed = new ExcelDocument("C:\\test\\input.xlsx", new ExcelConvertOptions()); List<String> worksheetNames = ed.getWorkSheetNames(); // Get the name of the first worksheet String sheet1Name = worksheetNames.get(0); // Tell the ExcelDocument […]
Command Line Word to PDF Conversion & Excel to PDF Conversion on Windows or Linux
Qoppa’s library jOfficeConvert can convert both Microsoft Word documents and Excel spreadsheets to PDF with high fidelity and has support for many advanced Office features. The library can be run through command line to convert Office documents to PDF on Windows, Linux, Unix or macOS. You will need to download Qoppa’s library jar, as well […]
Convert .dotx files to PDF in Java using jOfficeConvert
Q: Can Qoppa’s Java library jOfficeConvert open and convert .dotx files to PDF? A: Yes. dotx files are template files created by Microsoft’s Word processing programs. They are saved in the same XML format as the docx Word files but are named with a dotx extension to signify that they are templates.
Excel to PDF Conversion Options
When converting an Excel spreadsheet to PDF using jOfficeConvert, there are a few options that can be set through the ExcelConvertOptions class: Option to create a bookmark for each worksheet Option to set the layout of the page (fit to page, width or height) Option to set a maximum number for the output PDF Here […]
Convert an Excel worksheet to a Tiff Image in Java using jOfficeConvert
This Java sample program uses jOfficeConvert to convert an Excel spreadsheet to a multi page Tiff image. // Load the document ExcelDocument ed = new ExcelDocument("input.xlsx", new ExcelConvertOptions()); // Save the document as a multi-page TIFF file ed.saveDocumentAsTIFF("output.tif", new TIFFOptions(150, TIFFOptions.TIFF_FAX_GROUP4));// Load the document ExcelDocument ed = new ExcelDocument("input.xlsx", new ExcelConvertOptions()); // Save the […]
Print an Excel spreadsheet in Java using jOfficeConvert
jOfficeConvert allows to print an Excel spreadhsheet and send it either to the default printer or to a named printer. // Load the document ExcelDocument ed = new ExcelDocument("input.xlsx", new ExcelConvertOptions()); // Print to the default printer ed.printToDefaultPrinter(null); // Print to a named printer ed.print("my printer", null);// Load the document ExcelDocument ed = […]
Sample Java code to convert Excel to PDF using jOfficeConvert
To convert an excel spreadsheet to PDF using Qoppa’s library jOfficeConvert, it takes only 2 lines of code: // Load the document ExcelDocument excelDoc = new ExcelDocument("input.xlsx", new ExcelConvertOptions()); // Save the document as a PDF file excelDoc.saveAsPDF("output.pdf");// Load the document ExcelDocument excelDoc = new ExcelDocument("input.xlsx", new ExcelConvertOptions()); // Save the document as a […]
Create, Merge and Convert PDF documents with Mule in an automated Worklow
Qoppa’s Java PDF libraries can be used within Mule ESB to automate PDF document processes within a workflow. PDF files can be transmitted as an input stream to any of our Java libraries. Follow the detailed steps showing how to integrate Qoppa’s PDF library jPDFProcess within a Mule flow. The following PDF functions available in […]
Setting a fallback font when converting Word to PDF with jOfficeConvert
When converting a Word document to PDF using Qoppa’s PDF library jOfficeConvert, sometimes a font specified in the Word document may not be available on the machine. See our matching logic to identify a matching font. jOfficeConvert will then use the fallback font if one was set. Fallback Font Error You will see an error […]
Convert DOCM files to PDF using jOfficeConvert
Q: Is it possible to convert DOCM Word files to PDF using jOfficeConvert? A: If you change the extension from docm to docx, Qoppa’s Java library jOfficeConvert will be able to open the Word files and convert them to PDF. DOCM files are similar to DOCX files, but they contain macros and VBA scripting. Like […]
jWordConvert v2016R2 Build Notes
Here are the build notes for jWordConvert, Qoppa Java Word to PDF Conversion Library, for version v2016R2. v2016R2.06 – March 29 2017 JWOR-351 – Document Specific: JPEG image reading error: Numbers of source Raster bands and source color space components do not match v2016R2.05 – February 17 2017 JWOR-350 – Document Specific conversion error reads: […]
OldWordFileFormatException when converting Word 6 and Word 95 files to PDF
Q: We are using Qoppa’s jWordConvert for converting Microsoft Word documents to Adobe PDF. We are getting the below exception for the documents with a version less than or equal to 95. Can jWordConvert convert older Word documents? com.qoppa.org.apache.poi.hwpf.OldWordFileFormatException: The document is too old – Word 95 or older. Try HWPFOldDocument instead? at com.qoppa.org.apache.poi.hwpf.HWPFDocument.<init>(Unknown Source) […]
jWordConvert v2016R1 Build Notes
These are the build notes for jWordConvert v2016R1. v2016R1.07 – June 22 2016 JWOR-332: Added support for Top-to-Bottom and Bottom-to-top text directions in table cells v2016R1.06 – May 25 2016 JWOR-331 – Added support for “Scheme color” property and border ln.noFill property for DrawingML shapes. v2016R1.05 – April 21 2016 JWOR-330 – Fix issue with […]
Font Matching Logic when converting from Word to PDF without embedding fonts
Even though a PDF with non-embedded fonts does not contain actual font data, the PDF format requires certain information from the fonts used to create the PDF file. For this reason, Qoppa’s Word to PDF conversion library, jWordConvert, needs to locate a Java system font corresponding to each Word document font for the required information. This […]
Font Matching Logic when converting Word to PDF with embedded fonts
To create a PDF with embedded fonts, a local embeddable TrueType font file has to be identified for each Word document font. In the case where a local font cannot be determined for a Word document font then jWordConvert can be supplied with a single “fallback” font file path to use instead. Here is more […]
Setting the option to embed fonts or not when converting Word to PDF
In version v2016R1, it is possible to customize jOfficeConvert to either embed or not embed fonts in the output PDF document converted from Microsoft Word. Option to Embed Fonts Embedding fonts is the default option in jOfficeConvert starting in version v2016R1. It is important to define a fall back font to be used in case […]
Adobe Reader DC displays weird characters for embedded fonts when zooming
We found today a weird issue in the way Adobe Reader DC and Adobe Acrobat render some embedded fonts at certain zoom level. We first thought this was an Adobe bug but looking further into this issue, we found out that it was an issue with bitmap font tables being preserved by jWordConvert when subsetting […]
Support for Arabic, Hebrew, Right to Left Text in Word to PDF Conversion
Starting in version v2015R1, jOfficeConvert, Qoppa’s Java library, can convert Microsoft Word documents containing Arabic and Hebrew to PDF or print them. We’ve added support for right to left text layout including word order, indents, tabs, alignment, paragraphs, table cells and columns. We’ve implemented the unicode bi-directional algorithm for mixed text documents (right to left […]
ApachePOI ooxml conflict issue with jOfficeConvert
jOfficeConvert uses a subset of ooxml-schemas 1.1 where some classes and methods have been modified. Unfortunately since ooxml uses introspection internally, we could not rename the package and this can create a conflict for customers who also have this jar directly in their class path. Sample Exceptions Examples of exceptions received when there is a […]
v2015R1 jWordConvert Release
Version v2015R1 – June 04 2015 This version adds support for left to right text, such as Arabic or Hebrew, as well as many other small improvements and bug fixes. JWOR-23 – Support for styled/complex Headers and Footers JWOR-44 – Support for Right to Left Text for Arabic, Hebrew JWOR-58 – Support Drawing Clip Art […]
Is jOfficeConvert included in jPDFProcess?
Q: Is jOfficeConvert included in jPDFProcess? A: No, jOfficeConvert is licensed separately from jPDFProcess.
v2014R1 jWordConvert Release
Version v2014R1 – September 02 2014 This version adds support for WMF images which are being converted to vector graphics into the output PDF document. This allows to convert com objects such as mathematical equations or formula from Word to PDF. [JWOR-199] – Support for WMF images, which are now being converted to vector graphics […]
jOfficeConvert Java API
Q: Where can I find jOfficeConvert Javadoc API? A: You can find the API specification for the latest version of our library jWordConvert on our website at this link. jOfficeConvert is a java library to create PDF documents from Microsoft Word documents and Excel worksheets.
Can jOfficeConvert convert Word documents in .docx format to PDF?
Q: Does jOfficeConvert support converting .docx documents to PDF? A: Yes, jOfficeConvert, Qoppa’s java library to convert Word documents to PDF supports the latest Microsoft Word 2007-2010 format (Word files with a .docx extension) in addition to supporting Word 97-2003 (Word files with a .doc extension). Note: jOfficeConvert was previously named jWordConvert.
Code Sample: Java servlet to convert a Word file to PDF on the fly
A Java servlet that reads a Word documents and serves a PDF document to the browser, on the fly using Qoppa’s java library jOfficeConvert (previously jWordConvert).