Some test text!

Convert DOCX and Word Files to PDF in Java
Convert DOCX and Word Files to PDF in Java

Sample Java code for using PDFTron SDK to convert .docx to PDF without any external dependencies or Microsoft Word licenses. Perform .docx to PDF Java conversion on a Linux or Windows server to automate document workflows, or entirely in the user's client (web browser, mobile device). Combine the conversion functionality with our Viewer to display or annotate .docx files on all major platforms, including Web, Android, iOS, Xamarin, UWP, and Windows. Learn more about our Java PDF Library and Office Document Conversion Library .






Convert .docx to PDF Java

Use the following example to convert Word to PDF java. For more information about converting other Microsoft Office files, see Convert Office documents (Excel Word PowerPoint) to PDF using Java.



Convert to PDF

// Start with a PDFDoc (the conversion destination)
PDFDoc pdfdoc = new PDFDoc();

// perform the conversion with no optional parameters
Convert.officeToPdf(pdfdoc, inputFilename, null);

// save the result, SDFDoc.SaveMode.REMOVE_UNUSED, null);

Try our SDK for free today

PDFTron live tech update & run-through: Jan 20th at 11 am PT