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

Free Support Forum - aspose.com

Images converted from PDF->TIFF are having black background color instead of white in mspaint and microsoftoffice image tools

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Hi,

We recently purchased Aspose PDF component, by using below code snippet PDF files are converted to TIFF image.

Converted Tiff images –

1) Images are legitimate when it opens by using “IrfanImage”, “Microsoft office Document Imaging” tools. (Background color is : white and Text color is Black)

2) Same images when it opens by using “mspaint”, “Windows picture & Fax Viewer” tool – Image background coming in Black and Text in White color. Actually images suppose to be having white background and black text.

We would need a quick solution to view converted images uniformly in all image viewing tools. We appreciate quick response and solution.

Attached are:

1) Original PDF file.( 4831 EBDRTransactionAmountDiffersForm.pdf)

2) 4831 EBDRTransactionAmountDiffersForm_AsposeConverted.tif converted one.

Environment: JRE 7, OS: Linux and Windows.



Code Snippet:

SimpleDateFormat dateForamt=new SimpleDateFormat("dd-MM-yy:HH:mm:ss");

System.out.println("Image Conversion Start"+ dateForamt.format(System.currentTimeMillis()));

//Open document

com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("C:\\ImageConversion\\Pdf\\ImageConversionNewtry\\EBDResolutionProcessForm(8).pdf");

//Create stream object to save the output image

java.io.OutputStream imageStream = new java.io.FileOutputStream("C:\\ImageConversion\\Pdf\\ImageConversionNewtry\\EBDResolutionProcessForm(8)_Converted.tif");

//Create Resolution object

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

// instantiate TiffSettings object

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

// set the compression of resultant TIFF image


// set the color depth for resultant image


// skip blank pages while rendering PDF to TIFF


//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


dateForamt=new SimpleDateFormat("dd-MM-yy:HH:mm:ss");

System.out.println("After Save IMAGE"+ dateForamt.format(System.currentTimeMillis()));

Hi Senthil,

Thanks for your inquiry. I am able to view output TIFF image in Windows Photo Viewer and Paint on Windows 7. Please confirm your environment details, so we will further look into it.

Moreover, It seems you are using Windows XP as it is known issue of Microsoft XP, for XP one needs to use some third party image viewer for viewing Tiff image format e.g. Irafaview.

Best Regards,

Thanks for the Reply ! Apart from issues in XP, we saw major compatibility
issue with java PDF to TIFF conversion on LINUX operating system.<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

By using the code snippet (posted in my previous thread), PDFs are converted
to Tiff images aptly (except that image background color is black in XP) in
windows environment.<o:p></o:p>

But our environments are in LINUX, in LINUX PDF 90% content itself is
truncated in converted images. <o:p></o:p>

Attached are Original PDF and converted images in LINUX environment. Our
code is a deployed to WAS 8.5 server, it uses IBM Java 1.7 JRE.<o:p></o:p>

Our major production deployment is stalled, we would appreciate
quick resolution and workaround for the issue.<o:p></o:p>


Hi Raghu,

Thanks for your inquiry. We are testing the scenario over Linux and will share our findings with you soon.

Best Regards,

We are eagerly waiting on the response from Aspose team, Vantiv has priority support, we do expecting Aspose team to resolve/ get hold on the issue quickly. We would appreciate a quick resolution and workaround.

Do let us know the escalation process to get in touch with next level of support teams.


Hi Raghu,

Thanks for your patience. I have tested the scenario over Linux Ubuntu using Aspose.Pdf for Java 10.4.0 and noticed that although text is not missing but quality is not good. Can you please confirm your JAR version, if you are using some old version then please download and try latest version of Aspose.Pdf for Java and share the results.

We are sorry for the inconvenience caused.

Best Regards,

Hi Ahmad,

We have used latest Aspose-pdf-10.40 java component for pdf to tif conversion.

Our Operating system is :
Linux Kernal version - 2.6.32-504.23.4.el6.x86_64
Description: Red Hat Enterprise Linux Server release 6.6 (Santiago)
JRE version : Java 1.7_64 (WAS 8.5 JRE)

In our case data is missing in the converted images. You can see the attachment in my previous post.

If you need any further information, let us know right away. We need a resolution by eod 7/9.


Hi Raghu,

Thanks for sharing the details.

I have tested the scenario using Aspose.Pdf for Java 10.4.0 in a console application running over Red Hat Enterprise Linux 5.6 with JDK 1.8_25 and I am unable to notice any issue. As per my observations, the PDF files are properly being converted to TIFF format. For your reference, I have also attached the resultant files generated over my end. Can you please try using the latest release and in case you encounter any issue, please feel free to contact.

As discussed in chat, we would want your team to try it out in Red Hat Enterprise Linux Server release 6.6 with Java version 1.7.


Hi Raghu,

We are working on replicating the issue using JDK 1.7 and will keep you posted with our findings.

Hi Raghu,

I have again tested the scenario using Aspose.Pdf for Java 10.4.0 over Red Hat Enterprise 5.6 with JDK 1.7_71 and I am still unable to notice any issue. Furthermore, I am also unable to notice the black background and missing contents issues when viewing Images in MS Image and Fax viewer application or by using MS Paint.

Nevertheless, can you please take a look over attached TIFF images which I have again generated and in case you are still able to notice the problems, then it appears to be Linux version issue. Please acknowledge, so we may further look into this matter.

java version "1.7.0_71"
Java™ SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot™ 64-Bit Server VM (build 24.71-b01, mixed mode)

Yes, we confirm that this is an issue with Linux version. We are currently on Linux version 4.4.7 and the conversion does not work correctly with this version and JRE 1.7

Our expectation is that your product works on all versions of Linux. We have been working on this issue for more than a week and it is still unresolved .This issue is hindering a very critical client deliverable that needs to be rolled out next week. We really need to have this pdf conversion working correctly by this week in the Linux version we currently have. Please work on this issue with Top priority . Our Senior management is closely following this as well. I would strongly recommend that we have a conference call to troubleshoot this issue as we are running out of time with lengthy email conversations.
We absolutely need to have a fix and resolution to this issue by end of this week . Thanks in advance for your help.



Any updates? We are running out of time, please respond ASAP where you stand with the fix.

We are very disappointed with your support and speed of the response.


Hi Raghu,

Sorry for the delayed response.

I have logged this problem
PDFNEWJAVA-34994 in our issue tracking system as an investigation ticket. We will further
look into the details of this problem and will keep you updated on the status
of correction. Please be patient and spare us little time. We are sorry for
this inconvenience.


Do we have any update on investigation ticket? For better visibility & to keep the track on investigation progress, we would like to see a daily update note from your team.


Hi Raghu,

Thanks for your patience.

As we recently have been able to notice this issue, and until or
unless we have investigated and have figured out the actual reasons of this
problem, we might not be able to share any timelines by which this problem will
be resolved.

Furthermore, I am afraid we might not be able to share the progress on daily basis, but you may inquire the status at certain frequency i.e. once in a week or fortnight or this issue is fixed, we will surely updated you within this forum thread.

PS, as a normal rule of practice, the issues are resolved on first come first serve basis and as the team is already busy fixing previously reported issues, so unless they have started investigating this issue, we might not be able to share the ETA.

Hi Raghu,

Adding more to my previous comments, the development team has performed an initial investigation and have observed that it does not seem to be an error of Aspose.Pdf API. Some Microsoft’s products do not support used CCITT4 сcompression correctly (Please visit https://support.microsoft.com/en-us/kb/885938).

However, this image is successfully rendered in such viewers and editors as Gimp, Ocular and Adobe Photoshop. According to link below for avoiding this error could be used a LZW-compression (tiffSettings.setCompression(CompressionType.LZW)).

To be clear – Issue is not viewing the images in Microsoft tools.

Our main issues is with Linux OS – JAVA PDF Component is not compatible with LINUX 4.4.7. We want your team to focus in resolving the compatible issues. With Java 1.7 and Linux 4.4.7 images are converting without any errors, but the in the converted image most the content is missing. Note that it is not the image viewing issue, even in Irafaview tool content is missing.


Hi Raghu,

Thanks for sharing the details.

I have re-opened the previously reported issue and have shared your concerns with product team. They will surely consider this information and as soon as we have some further updates, we will let you know.


This case has been opened for nearly a month. We will need to make a decision soon to either wait for a fix from Aspose or go with another product. Can you please provide me an escalation resource name that I can contact in regards to this issue? I need a manager’s contact information… can you please provide?