PNG with black background

Hi,


I’ve got a word document with a png image inside.

I need to create a pdf, with low resolution images, from that document.

I’ve attached a sample document and this is my code:

Document doc = new Document(source);
Aspose.Words.Saving.PdfSaveOptions SaveOpt = new Aspose.Words.Saving.PdfSaveOptions();
SaveOpt.ImageCompression = Aspose.Words.Saving.PdfImageCompression.Jpeg;
SaveOpt.JpegQuality = 100;
doc.Save(output, SaveOpt);

The problem is that all my png images in pdf have a weird black background.

How can I solve this problem?

Thanks,
Devid

Hi Devid,


Thanks for your inquiry. I have tested the scenario while using latest version of Aspose.Words for .NET 13.5.0 and have not found any issue with output Pdf file. Please note that Aspose.Words tries to mimic the same behaviour as MS Word do. If you convert your document to Pdf by using MS Word, you will get the same output . I have attached the output Pdf file with this post for your kind reference.
Devid.Fabris:
The problem is that all my png images in pdf have a weird black background.
Could you please share some more detail about your query along with output document showing the undesired behavior.