Write Image Interpolation Flag for PDF Readers to Render High Quality Smooth Images | Convert Word DOCX Document to PDF File using C# .NET

I have using flowing code to convert Word document to PDF:

var document = new Aspose.Words.Document(@"D:\Test.docx");
var pdfSaveOption = new Aspose.Words.Saving.PdfSaveOptions
{
  ImageCompression = Aspose.Words.Saving.PdfImageCompression.Jpeg,
  UseHighQualityRendering = true,
  JpegQuality = 100,
  DmlEffectsRenderingMode = Aspose.Words.Saving.DmlEffectsRenderingMode.Fine,
};

pdfSaveOption.DownsampleOptions.Resolution = 320;
pdfSaveOption.MetafileRenderingOptions.RenderingMode = Aspose.Words.Saving.MetafileRenderingMode.VectorWithFallback;


document.Save(@"D:\Converted by Aspose.pdf", pdfSaveOption);

The generated PDF has a lower quality than that PDF file was generated from the same file by the MsWord.
In the attached image you can see comparing the results.
Result.jpg (238.1 KB)

I also attached the main Word document and generated PDF files.
documents.zip (158.4 KB)

@freydoonk,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19996. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-19996) have been fixed in this Aspose.Words for .NET 20.4 update and this Aspose.Words for Java 20.4 update.

@freydoonk,

An image interpolation option for PDF rendering (named PdfSaveOptions.InterpolateImages) was added in 20.4 version of Aspose.Words for .NET API to indicate whether image interpolation shall be performed by a conforming reader (such as Adobe Acrobat Reader) or not. Here is how you can make use of this option during converting Word DOCX document to PDF format using C# .NET:

Document doc = new Document("C:\\Temp\\Word.docx");
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.InterpolateImages = true;
doc.Save("C:\\Temp\\InterpolateImages-true.pdf", saveOptions);