We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem converting PDF to Tiff

Hello,



I am testing (try before buy) your Aspose.Pdf library to convert a PDF to Tiff.

This is working without problems, but the result is very unsatisfying. In the PDF-document where is a table with alternating lighter or darker background for one row. In the resulting Tiff there is no colour at all as background for a row. This is a real issue for us. Could you help us out?

(the test4.tiff.jpg is a tiff, please rename to test4.tiff)

Thanks

Robert

Hi Robert,


Thanks for your inquriy. I have tested the scenario with Aspose.Pdf for Java 11.1.0 using following code snippet and unable to notice the problem, please find attached output. Please download and try latest version of Aspose.Pdf for Java, it will resolve the issue.

//Open document<o:p></o:p>

com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(myDir+"test4.pdf");

//Create stream object to save the output image

java.io.OutputStream imageStream = new java.io.FileOutputStream(myDir+"test4_ev.tif");

//Create Resolution object

com.aspose.pdf.devices.Resolution resolution = new com.aspose.pdf.devices.Resolution(300);

//instantiate TiffSettings object

com.aspose.pdf.devices.TiffSettings tiffSettings = new com.aspose.pdf.devices.TiffSettings();

//set the compression of resultant TIFF image

tiffSettings.setCompression(com.aspose.pdf.devices.CompressionType.LZW);

//set the color depth for resultant image

tiffSettings.setDepth(com.aspose.pdf.devices.ColorDepth.Default);

//skip blank pages while rendering PDF to TIFF

tiffSettings.setSkipBlankPages(false);

//tiffSettings.setBrightness(40);

//Create TiffDevice object with particular resolution

com.aspose.pdf.devices.TiffDevice tiffDevice = new com.aspose.pdf.devices.TiffDevice(resolution,tiffSettings);

//Convert a particular page (Page 1) and save the image to stream

tiffDevice.process(pdfDocument,1,1, imageStream);

//Close the stream

imageStream.close();

Please feel free to contact us for any further assistance.


Best Regards,

Hello,



thank you for your quick answer. I tried your code and I got in windows a blank tiff and on a mac a very bright unusable tif… After changing tiffSettings.setDepth(com.aspose.pdf.devices.ColorDepth.Default)



to



tiffSettings.setDepth(com.aspose.pdf.devices.ColorDepth.Format8bpp)



I got the correct tif with the missing background color in the table as described in my first post…

Changing it to Format4bpp is even worser…



Any idea?

(I attached you my tif in test4_ev.tif)



Thank you,

Best regards

Robert

Hi Robert,


Thanks for your feedback. After initial investigation, I have logged a ticket PDFNEWJAVA-35430 in our issue tracking system for further investigation and resolution. We will keep you updated about the issue resolution progress.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWJAVA-35430) have been fixed in Aspose.Pdf for Java 11.2.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.