We recently purchased the Aspose PDF component. Using the following code snippet, PDF files are converted to TIFF images.
Converted Tiff images:
Images are legitimate when opened using “Irfan Image” and “Microsoft Office Document Imaging” tools. (Background color is white and Text color is black)
The same images, when opened using “mspaint” and “Windows Picture & Fax Viewer” tools, result in images with a black background and white text. Actually, the images should have a white background and black text.
We would need a quick solution to view the converted images uniformly in all image viewing tools. We appreciate a quick response and solution.
Attached are:
Original PDF file (4831 EBDRTransactionAmountDiffersForm.pdf).
SimpleDateFormat dateForamt = new SimpleDateFormat("dd-MM-yy:HH:mm:ss");
System.out.println("Image Conversion Start" + dateForamt.format(System.currentTimeMillis()));
/*
System.out.println("Date Time" + 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
tiffSettings.setCompression(com.aspose.pdf.devices.CompressionType. CCITT4);
// set the color depth for resultant image
tiffSettings.setDepth(com.aspose.pdf.devices.ColorDepth.Format1bpp);
// skip blank pages while rendering PDF to TIFF
tiffSettings.setSkipBlankPages(false);
//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();
dateForamt = new SimpleDateFormat("dd-MM-yy:HH:mm:ss");
System.out.println("After Save IMAGE" + dateForamt.format(System.currentTimeMillis()));
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.
Apart from issues in XP, we saw major compatibility issue with java PDF to TIFF conversion on LINUX operating system.
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.
But our environments are in LINEUX, in LINEUX PDF 90% content itself is truncated in converted images.
Attached are Original PDF and converted images in LINEUX environment. Our code is a deployed to WAS 8.5 server, it uses IBM Java 1.7 JRE.
Our major production deployment is stalled, we would appreciate quick resolution and workaround for the issue.
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.
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 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.
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.
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.
I have logged this problem
as 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.
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.
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.
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?
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.