Free Support Forum -

Word To PDF Shrinks Margin and Text

When I run this code, it shrinks the output to pdf. My margins go from 3/4 to 15/16. The text is smaller to. I need to render as if it was printed from Word.

private void button1_Click(object sender, EventArgs e)


string MyDir = "c:\\testdocs\\";

string FileIn = "VA_Appraisal_Fax_Doc.docx";

string FileOut = "word2pdf-NoComp.pdf";

Aspose.Words.License license = new Aspose.Words.License();


Document doc = new Document(MyDir + FileIn);

Aspose.Words.Saving.PdfSaveOptions oPdfSaveOptions = new Aspose.Words.Saving.PdfSaveOptions();

oPdfSaveOptions.TextCompression = Aspose.Words.Saving.PdfTextCompression.None;

doc.Save(MyDir + FileOut);



Thanks for your request. I converted your document to PDF using MS Word and Aspose.Words and compared the resulting files. As I can see font size and margins are the same in both documents. I see only minor difference in distance between text lines. This occurs because Aspose.Words and MS Word uses different algorithms to calculate height of font. But this minor difference is acceptable.

Best regards,

The U.S. bankruptcy Courts will not accept this. This court requires 3/4 margins, not 15/16. It requires certain font sizes, not 85% of the font size. It requires the document in PDF format.

Print the word file, print the pdf the word.aspose generates, you will see a major difference. We need to know how to stop this over all shrinkage. We need it to render to PDF exactly as the word file prints to printer.

I did print the word file using the actual Adobe driver and we saw similar shrinkage.

I hope you can help, I want to write the code for the word docs thinking WYSWYG, it will be a pain if I have to remember to code 1/2 if I want 3/4, 10.8 font when I want 10 point. Yikes, that will be a pain.

Hope you can help.Thanks for your help.


Thank you for additional information. But I still cannot see this significant difference you are talking about. I opened the generated PDF and the original Word document side by side and compared them. As I can see, PDF looks identical to the original Word document. Please see the attached screenshot.

Best regards,

Wow, your results are so different than ours. Yours look to be acceptable. Let me see if I can send you a screen shot of out delima.

I have taken prints and run scans so that you can get a sense of the results I am getting. I think if you printed the docx and pdf attachments I sent previously you would see what these images represent as well.

So yours does look better, so you have my code, is there something wrong with it?


Thank you for additional information. On the screenshot I attached I compared the document you have attached earlier.

I tried to print from MS Word and from Adobe Acrobat Reader to XPS file and then compared the result. As I can see there is no such significant difference. There is slight difference in the quality of text, but this seems to be a specific of printing from MS Word and Acrobat Reader.

Best regards,