Font size lost, shrinks or not converted correctly after conversion from DOCX to PDF

20 views
Skip to first unread message

Patrick Ocampo

unread,
Jul 15, 2016, 5:42:09 AM7/15/16
to xdocreport
Hi Team,


(Urgent issue, please take a look) I noticed that after conversion of my input DOCX "Test Lorem Ipsum With Different Margins.docx" into "Actual Result Lorem Ipsum.pdf" (please see attached files) - The font sizes of the texts seems to have shrunk in general, so in the resulting first page of generated PDF there is a gap at the bottom of the page, which wasn't there when the document was still in DOCX format.

Yes, my DOCX file or template has a page 1 top and bottom margins which are different from the remaining pages (this particular setting is actually required by our client) that needs to be converted into PDF without losing the margins or the font size, formatting etc.

I used an online DOCX to PDF converter for comparison - https://online2pdf.com/ - and the result was correct, the font sizes, layout are maintained throughout (please see "Output (using online converter).pdf" attachment.

Could this be a bug somewhere within XDocReport's implementation? I previously used version 1.0.0 and now have tried 1.0.6 (the latest) but the result was the same. Hoping to get some opinion on this, as this case is very urgent.


The code I used:

XWPFDocument xwpfDocument = new XWPFDocument(inputStream);

// 2) Prepare Pdf options
PdfOptions options = PdfOptions.create();

// 3) Convert XWPFDocument to Pdf
OutputStream out = new FileOutputStream(new File("d:\\Actual Result Lorem Ipsum.pdf"));
PdfConverter.getInstance().convert(xwpfDocument, out, options);
out.close();
inputStream.close();



Thanks,
Patrick
Test Lorem Ipsum With Different Margins.docx
Output (using online converter).pdf
Actual Result Lorem Ipsum.pdf
Reply all
Reply to author
Forward
0 new messages