Convert Word to PDF losses high DPI image

I have the following code and the attached sample document to illustrate the problem of losing high DPI image details when converting a Word document to a PDF.

new Document("input.docx").Save("output.pdf", SaveFormat.Pdf);

If you zoom in to the header and footer of both the Word document and the PDF file, it’s easy to see the PDF file’s header and footer becomes blurry compare to the Word document.

input.docx (390.9 KB)

@bvadala By default upon exporting to PDF Aspose.Words downsamples the images. You can disable downsampling in PdfSaveOptions. For example try using the following code:

Document doc = new Document(@"C:\Temp\in.docx");
PdfSaveOptions options = new PdfSaveOptions();
options.DownsampleOptions.DownsampleImages = false;
doc.Save(@"C:\Temp\out_no_downsample.pdf", options);
1 Like

Hi @alexey.noskov this worked great. Thank you!

1 Like