Convert PDF to TIFF get null error

Hi Evgen,


The multi-page TIFF option works as expected. The result TIFF file is slightly bigger than our merge function though.

The setResolution(100) still does not make any differences. I tried using 300, 500, 1000. I do not see any change in resolution of file size. We need the image quality to be better.

I attached the result TIFF file using options: width=960, height=1280, resolution=100, multipageTIFF=true with TIFF_COMPRESSION_LZW compression. The issue now is, the signature portion is still not clear enough - the label underneath it is not fully readable.

I also attached the result from another tool for PDF to TIFF conversion. It produced good quality TIFF with small file size.

Please help improve the image quality. I think this is the only critical issue we face.

Thanks!
Catherine

Hello Catherine,

As we discussed in live chat, that at the moment you can't use resolution parameter together with width and height parameters. We have discussed the issue with our Product team and created a ticket (CONVERSIONJAVA-115) to fix it . But the issue depends from other libraries that included in the Conversion library and the fix will take longer time than expected.

You will be notified when the issue will be resolved.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Thanks for creating a ticket for the setWidth and setHeight.


Our application processes the TIFF documents. For example, split and create new TIFF with subset of pages. This function has been working for years.

While working on the TIFF images generated by GroupDocs Java API, we got the below exception:
java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match.

I attached our test Java code and a GroupDocs created TIFF image with this document. Please help investigate if the TIFF image has any special settings that caused the exception. How should we fix the issue?

Thanks!
Catherine
Two more issues identified with the new conversion jar file. Please help get them fixed asap and provide link for us to download and test.

1) The converted TIFF image can be displayed in Windows Photo Viewer. However, it displays all BLACK using our content manager jsp viewer. This jsp viewer is used to display all types of files including tiff. Somehow, it cannot display GroupDocs converted TIFF. I wonder if some metadata in the TIFF causing this.

2) When converting from Word document to Tiff, got the below exception. I think this was fixed with an earlier 1.3.0 jar a few weeks ago. Now the issue comes back.

2015-10-23 23:31:51,349 INFO java.lang.ExceptionInInitializerError

2015-10-23 23:31:51,350 INFO at com.groupdocs.conversion.internal.b.b.a.X.(Unknown Source)

2015-10-23 23:31:51,351 INFO at com.groupdocs.conversion.internal.b.b.a.X.a(Unknown Source)

2015-10-23 23:31:51,352 INFO at com.groupdocs.conversion.internal.b.b.a.z.hdb(Unknown Source)

2015-10-23 23:31:51,353 INFO at com.groupdocs.conversion.internal.b.b.a.q.(Unknown Source)

2015-10-23 23:31:51,354 INFO at java.lang.Class.forName0(Native Method)

2015-10-23 23:31:51,354 INFO at java.lang.Class.forName(Unknown Source)

2015-10-23 23:31:51,355 INFO at com.groupdocs.conversion.internal.a.ly.(Unknown Source)

2015-10-23 23:31:51,358 INFO at com.groupdocs.conversion.internal.a.lW.c(Unknown Source)

2015-10-23 23:31:51,359 INFO at com.groupdocs.conversion.internal.c.a.w.Kd.aq(Unknown Source)

2015-10-23 23:31:51,361 INFO at com.groupdocs.conversion.internal.c.a.w.Kd.a(Unknown Source)

2015-10-23 23:31:51,363 INFO at com.groupdocs.conversion.internal.c.a.w.ZC.au(Unknown Source)

2015-10-23 23:31:51,365 INFO at com.groupdocs.conversion.internal.c.a.w.ZC.a(Unknown Source)

2015-10-23 23:31:51,366 INFO at com.groupdocs.conversion.internal.c.a.w.U.a(Unknown Source)

2015-10-23 23:31:51,367 INFO at com.groupdocs.conversion.internal.c.a.w.U.a(Unknown Source)

2015-10-23 23:31:51,368 INFO at com.groupdocs.conversion.internal.c.a.w.U.a(Unknown Source)

2015-10-23 23:31:51,369 INFO at com.groupdocs.conversion.internal.c.a.w.U.a(Unknown Source)

2015-10-23 23:31:51,370 INFO at com.groupdocs.conversion.converter.a.h.b(Unknown Source)

2015-10-23 23:31:51,370 INFO at com.groupdocs.conversion.converter.b.b(Unknown Source)

2015-10-23 23:31:51,371 INFO at com.groupdocs.conversion.handler.ConversionHandler.convertToImage(Unknown Source)

2015-10-23 23:31:51,372 INFO at com.apria.icrt.ecm.ECMIntegrationImpl.convertToTiff(ECMIntegrationImpl.java:197)

2015-10-23 23:31:51,374 INFO at com.apria.icrt.ecm.ECMIntegrationImpl.sendToECM(ECMIntegrationImpl.java:122)

2015-10-23 23:31:51,375 INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2015-10-23 23:31:51,376 INFO at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2015-10-23 23:31:51,377 INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2015-10-23 23:31:51,378 INFO at java.lang.reflect.Method.invoke(Unknown Source)

2015-10-23 23:31:51,379 INFO at org.activebpel.rt.bpel.server.engine.invoke.AePojoInvokeHandler.invokePojoMethod(AePojoInvokeHandler.java:416)

2015-10-23 23:31:51,379 INFO at org.activebpel.rt.bpel.server.engine.invoke.AePojoInvokeHandler.handleInvoke(AePojoInvokeHandler.java:171)

2015-10-23 23:31:51,380 INFO at org.activebpel.rt.bpel.server.engine.invoke.AeInvoker.handleInvoke(AeInvoker.java:207)

2015-10-23 23:31:51,382 INFO at org.activebpel.rt.bpel.server.engine.AeInMemoryQueueManager$1.run(AeInMemoryQueueManager.java:186)

2015-10-23 23:31:51,382 INFO at org.activebpel.work.AeDelegatingWork.run(AeDelegatingWork.java:62)

2015-10-23 23:31:51,383 INFO at org.activebpel.work.AeProcessWorkManager$AeProcessWork.run(AeProcessWorkManager.java:254)

2015-10-23 23:31:51,385 INFO at org.activebpel.work.AeDelegatingWork.run(AeDelegatingWork.java:62)

2015-10-23 23:31:51,385 INFO at org.activebpel.work.AeExceptionReportingWork.run(AeExceptionReportingWork.java:58)

2015-10-23 23:31:51,385 INFO at org.activebpel.work.AeWorkerThread.run(AeWorkerThread.java:156)

2015-10-23 23:31:51,386 INFO Caused by: java.lang.NullPointerException

2015-10-23 23:31:51,387 INFO at com.groupdocs.conversion.internal.b.b.a.b.b.hdu(Unknown Source)

2015-10-23 23:31:51,389 INFO at com.groupdocs.conversion.internal.b.b.a.b.b.(Unknown Source)

2015-10-23 23:31:51,389 INFO at com.groupdocs.conversion.internal.b.b.a.Y.(Unknown Source)

2015-10-23 23:31:51,389 INFO ... 34 more

Thanks!
Catherine
Hello Catherine,

Thank you for your request.

We have investigated your FaxTiffUtil_TEST2.java file and not found any sample code of using our library in your file. According on that we can assume that you have shared only your custom classes for conversion via other libraries. Could you please share with us your full stack trace of the issue and the code example of using our library .

Regarding your issue with view the converted file. Could you please explain in more details about your content manager jsp viewer, because we can't reproduce your situation on our side. Will be useful if you provide any sample documents that can work well for your Viewer and the documents that can't. We will investigate theirs metadata to understand a reason of the issue.

Regarding .doc to .tiff conversion. Yes, our Product team is working on this issue now and it makes all the best to resolve the issue ASAP . We will share with you the fixed demo version of the library when it will be available.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Please find attached Fax document that display well in our image viewer. The same viewer displays GroupDocs converted TIFF in all Black.

I attached the Java Project TiffUtilProject to reproduce the issue we encountered with TIFF split. We use JDK 1.6 in the project.


Please help investigate the issue and provide your expertise to resolve it.

Thanks!
Catherine

Hello Catherine,

Thank you for your file and sample project.

We will share your file with our Product team and they will investigate it . When we will have any news, then you will be notified.

About your project . As we can see from your convertToBilevel3 method , you try to convert multi-color .tiff file to file with black image color and seems that your method is unnecessary, because you can convert your .pdf file to multi-page .tiff file with black image via our library. For it you should just set this compression TIFF_COMPRESSION_CCITT3 . We have tested this compression on your project and now the logic of project is not using convertToBilevel3 method . We think that it is only solution for this issue.

If you will have more questions please feel free to contact us.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

I want to summarize the issues here. As you can see, some of the issues are showstopper for us. I hope you can arrange a discuss session with us to understand our concerns in detail and target the solutions accordingly. I will send an email on this.


Issue #1 Converting word documents start to fail with the latest link we got. It was fixed in an earlier link. This is functional failure. Please help get this resolved asap.

Issue #2 TIFF image not display properly in IBM eClient custom JSP viewer.
Using TIFF_COMPRESSION_LZW compression, the TIFF will be displayed in all black.
Using TIFF_COMPRESSION_CCITT3 compression, the TIFF displayed in very black background. I attached the original TIFF and what it look like in the viewer. Image seems to display in opposite color than original image.

Issue #3 TIFF image does not display perfectly in Alternatiff viewer. Our application uses Alternatiff viewer to display TIFF images.
TIFF width/height is huge with the acceptable resolution. In Alternatiff viewer , the image displayed with unpredictable effect. With magnifying glass, it looks sometimes very big, sometimes very tiny.

Issue #4 Unable to split the colored version (LZW) document with exception “Numbers of source Raster bands and source color space components do not match”. LZW is preferred because it does not lose image color. Please note, we do not split document all the time.
If using TIFF_COMPRESSION_CCITT3, it loses color and not display properly in JSP viewer. This is linked to Issue #2.

I look forward to the latest library to be available soon.

Thanks!
Catherine

Hello Catherine,

We have sent the link for new version of the library to you by email. Please check it , in this version conversion from .doc to .tiff should work well.

Also we continue to investigate your project with split functionality and at the moment we found out that if we will use another .tiff file that converted via our library by this code
ImageSaveOptions imageSaveOptions = new ImageSaveOptions();
imageSaveOptions.setSaveFileType(ImageSaveOptions.TIFF);
imageSaveOptions.setResolution(150);
imageSaveOptions.setUseMultipagesTiff(true); imageSaveOptions.setMultipageTiffCompression(ImageSaveOptions.TIFF_COMPRESSION_LZW);

then we not get this issue ("Numbers of source Raster bands and source color space components do not match"). Could you please specify with which imageSaveOptions you have converted your file. Also please try to check the same file with new version of the library and notify us with the results.

We have debugged your project and get new error "Bilevel encodings are supported for bilevel images only." and seems that the issue occurs because of this configuration

params.setExtraImages(new TiffIterator(decoder, iterator, convert));

We will continue investigate of the issue and when we will have any news we will notify you.

Regarding your issue with view output files in your Viewer. We understand that this issue is important to you but our Product team still works on it and we think that we will have results tomorrow .

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi Evgen,


I downloaded the latest demo version and samples, now the word to TIFF conversion works as expected!!!

The TIFF images with LZW compression now displays properly in IBM TIFF Viewer. However, the TIFF image with CCITT3 compression still display in opposite color.

You guys have made very good progress so far.

The CCITT3 compression TIFFs split well. The LZW compression TIFFs has split exception: “Bilevel encodings are supported for bilevel images only” - as your comments specified. I understand that you are working on this issue. Let me attach 2 files - 1 with CCITT3 and 1 with LZW compression. This will help you verify your fix. I would appreciate if you could get this done asap, then we will be free of issues!!!

Thanks!
Catherine

Hello Catherine,

Glad to hear that several issues were resolved with new version of Conversion library.

We have the news for you about your issue "Bilevel encodings are supported for bilevel images only" . Seems that you have some issues with pages of iteration for multi-page .tiff files. Because when we manually set up count of pages from document as shown on the screenshot , then the logic of project works well and we can get three splitted documents in "image_target" folder. So, please investigate your code and fix your bug on your side, seems that the ImageEncoder gets incorrect page number.

Regarding the viewing issue. We have prepared new demo version of the library for you, with the new functionality of conversion . We can assume that with this functionality you will fix your issue with your IBM Viewer. You can download this demo version by this link. Also we have attached the sample code of using new functionality to this thread.

Please let us know if you will have any questions.

---------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi Evgen,


I tried using the latest library, but did not get good result. I attached the Java code and result TIFF files.

Basically, TIFF files created with various options cannot render properly or failed in IBM Viewer.

All of them failed during split with either “Numbers of source Raster bands and source color space components do not match” or “Bilevel encodings are supported for bilevel images only”.

Note that the split issue has been fixed for the TIFFs generated from the previous java library. It is a program bug in our code. Has nothing to do with conversion.

Please look at attached file for detailed.

Thanks!
Catherine

Your latest solution also has a drawback, which is I will have to use specific fromOptions for each original file type. We will need to change code dramatically.

Currently, our best result is the LZW compression TIFF generated from public API.

It displays well in IBM Viewer and we can split it successfully.
The issue now is the split of LZW and CCITT3 displays color inversely.

Do you have any solution for this last piece?

Thanks!
Catherine

Hello Catherine,

Thank you for you file examples. We will investigate them and when we will have any results we will come back to you.

About your issue in IBM Viewer . Could you please share with us more details about it. Because we need to investigate this Viewer to find a reason of rendered issue and will be useful if you share it version , maybe your custom settings that you use and the link by which we can download it for test.


----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

We use eClient application that come with IBM Enterprise Content Manager version 8.4.3. The viewer is called eClient viewer applet. I doubt if you can download it because it is part of eClient application from a licensed software.


Thanks!
Catherine

Hello Catherine,

As we discussed in Live chat , that we will wait your results of the new functionality test.

But at the moment we have another suggestion for you. Could you please change the variant of the compression in your project as shown on the screenshot and try to split a file after LZW compression, as you did before? And then please view these splitted files in your IBM viewer.

We will wait for your results.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hello,


I have tested with all variants with ToTiffJaiOptions, ToTiffDeviceOptions and ToTiffOptions. Here is a summary of the rest result.
- Compression LZW always display well in the IBM viewer. However, the split documents display in inverse color.
- If converted document is in black and white, they always display in inverse color in IBM viewer.
- Many of the converted documents get “Numbers of source Raster bands and source color space components do not match” exception when split.

No option can provide satisfactory result. Do you have any further suggestions?

Thanks!
Catherine

Hello Evgen,


As discuss in Live Chat, I am attaching a few TIFF files for you review.

- FaxTIFF.tif
This fax document displays properly in IBM Viewer.
- cms484_LZW.tiff
This document is result of converting PDF document into TIFF with LZW compression using GroupDocs conversion library. It displays properly in IBM Viewer.
- cms484_LZW_0.tiff
This document is result of splitting cms484_LZW.tiff page 1. It displays in inverse color in IBM Viewer.
- cms484_CCTT3.tiff and cms484_CCITT4.tiff
This document is result of converting PDF document into TIFF with CCITT3/CCITT4 compression using GroupDocs conversion library. They display in inverse color in IBM Viewer.

Please help review them and provide your feedback and suggestions on how to make the split document display properly in IBM Viewer.

Thanks!
Catherine

Hello Catherine,

Thank you for your files.

The Product team was informed about it and we created a ticket in our system (CONVERSIONJAVA-131). We understand that this issue is important to you, but please be patient we will notify you when we will have any news or solution for you from our Product team.

Sorry for the inconvenience.

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+