Free Support Forum - aspose.com

Convert PDF to image content formatting issue

When we convert attached “Original.pdf” to image it result into image as atatched “Aspose - ConvertToImage.pdf”. The background if “Invoice” rectangle changes. The logo in the top right becomes more dark than it should be. We use following code to convert into black and white image.


Code part :-

var savePdfDocument = new Aspose.Pdf.Document(inputPDFFile);
var tiffSettings = new TiffSettings
{
Compression = CompressionType.CCITT4,
Shape = ShapeType.None,
SkipBlankPages = true
};

var tiffDevice = new TiffDevice(resolution, tiffSettings);
var pages = savePdfDocument.Pages;
var pgCount = pages.Count;

for (int pg = 1; pg <= pgCount; pg++)
{
var saveName = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(outputMultipageTiff), System.IO.Path.GetFileNameWithoutExtension(outputMultipageTiff) + pg + System.IO.Path.GetExtension(outputMultipageTiff));
tiffDevice.Process(savePdfDocument, pg, pg, saveName);
}
savePdfDocument.Dispose();

Hi there,

Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for .NET 10.5.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-38979 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

Please feel free to contact us for any further assistance.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
Calibri;color:#333333;mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA”>Best Regards