I am testing Aspose.Words version 17.9 (eval version with a temporary license).
When I convert a Word document with embedded JPG images to a PDF, I have the following two issues:
- the resulting PDF is 2x larger that the PDF created by exporting from Word
- the images in the PDF are very jaggy when viewing in Adobe and zooming in (1200% zoom)
To try and reduce the file size I tried adjusting the downsampling:
//pdfSaveOptions.DownsampleOptions.DownsampleImages = true; // default true //pdfSaveOptions.DownsampleOptions.ResolutionThreshold = 100; // default 0 //pdfSaveOptions.DownsampleOptions.Resolution = 96; // default 220
I also tried the following, which reduced the size but at the possible expense of image quality. I know it is always a balance between size and quality.
// Defaults to Auto //pdfSaveOptions.ImageCompression = Aspose.Words.Saving.PdfImageCompression.Jpeg; //pdfSaveOptions.JpegQuality = 50;
To try and improve the image quality I tried changing the antialiasing and the high quality rendering options:
// Defaults to False pdfSaveOptions.UseAntiAliasing = true; pdfSaveOptions.UseHighQualityRendering = true;
I have attached a screenshot of the difference in image quality between the PDF file produced by Aspose and that produced by Word, as well as a zipped sample Word document.
WordToPDFImageJaggy.jpg (180.7 KB)
For my test Word document. I just copied a selection of JPG files from Windows desktop background images to create my file. When converted with Word it gave 2,741KB file while Aspose created a 6,677KB file. I can’t attach the file but if you need it I can get it to you.
Is there anything I can do to get a file size and output quality similar to Word’s PDF export?? :