We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word to pdf conversion page top en bottom margins are not the same after converting

When converting docx documents to pdf something is going wrong with the top en bottom margins
Its looks that the converter is using 35.433070866 points (1,5 cm) instead of 70.9 points (2.5cm).
When reading the values from the source document it seems to be correct:

 Document document = new Document(iinputstream);
DocumentBuilder builder = new DocumentBuilder(document);
PageSetup pageSetup = builder.getPageSetup();
pageSetup.getTopMargin() = 70.9 points
pageSetup.getBottomMargin() = 70.9 points

When opening the original docx document in Office365: ok with correct margings
When opening the original docx document in LibreOffice: NOT ok: I need to change the top en bottom margings to 70.9 points: then it is correct!
So is Aspose using a LibreOffice default engine to transform to pdf ???



Could you please ZIP and attach your input Word document along with problematic and expected output PDF files here for testing? We will investigate the issue and provide you information on it.

word.zip (133.4 KB)
The attached zip with the orginal docx fille and the transformed .pdf from aspose.
As you can see is the text below on the first page, but was expected on the second page:

Als u nog vragen heeft, kunt u contact opnemen met Patrick boll te bereiken op telefoonnummer 06-123456784.


We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22511. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.