TIFF to Image conversion issue in Java

Untitled.png (3.1 KB)
sorry this one

so while providing this path of License fileā€¦this same coming
[Fatal Error] :1:1: Content is not allowed in prolog.

@amrit007,

Donā€™t you have the license file?

If you donā€™t have the license file, then you must not invoke the applyLicense method. It would certainly give you error.
So, by disabling the applyLicense method you can run the project and have output with limitations.
However, the good thing is you can get a temporary license here. Follow the wizard and on step 5 you can avail a temporary license. You can easily get a temporary license for GroupDocs.Conversion for Java and put it in the base directory of your project. And then instead of pointing to GroupDocs.Total.Java.lic, point to GroupDocs.Conversion.Java.lic (that you will get by following the wizard).
Please note that a temporary license is time-restricted full license that allows you to evaluate all features of the API.
Following these instructions you will get rid of that (license file not found) error.

ok i am trying to run the project without invoking License fileā€¦ the error is
Exception in thread ā€œmainā€ java.lang.VerifyError: Bad type on operand stack

@amrit007,

It seems a environment related issue.
java.lang.VerifyError can be the result when you have compiled against a different library than you are using at runtime.
One thing more, sometimes itā€™s the IDEā€™s fault, or the device that the bytecode isnā€™t right. Try restarting the IDE to get it to recognize the sync issue. Failing that delete and re-install the app. Rebooting the device may also help.
Are you exploring our example project? Did you make any change in the project? If yes, then please share the changes you committed or the problematic application.
Aside this, share following details with us:

  • Your IDE
  • Java version
  • JDK and JRE version
  • Operating system
  • Complete stack trace of the exception/error

We have Java version 1.8.0_77, JDK 1.8.0_77 and JRE jre1.8.0_91.

1 Like

i came to know it was license defect and i was trying to convert over the limitation.
with jetty server using cmd conversion is happening. here are the the problems-

1-on local,Unable to get output file.(with jetty server its working as per guidance given on github)
but i want it to my local
2- Image related conversion is not happening
- image to pdf
-pdf to image
- tiff to image
all image related issue is present there

@amrit007,

Weā€™ve prepared a simple console application for you - Examples.zip (2.7 MB). Using this you can do image to PDF and TIFF to Image conversions.
However, PDF to Image conversion has some issue that weā€™ve logged in our internal issue tracking system with ID:CONVERSIONJAVA-546. As we have any update on it, you shall be notified.

Can you please elaborate this scenario with more details?

1 Like

the code u have given, for multi page tiff its not working (means tiff to pdf) . after conversion black pages is coming. see the attachment(it was 4 page tiff) .tiff.tiff.pdf (359.8 KB)

@amrit007,

Can you please share the problematic multi-paged TIFF file with us?

@amrit007,

You can also convert PDF to Image without any issue. Please follow the given code:

ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
SaveOptions saveOption = new ImageSaveOptions();
saveOption.setConvertFileType(ImageSaveOptions.ImageFileType.TIFF);
ConvertedDocument convertedDocumentPath = conversionHandler.<List<String>> convert(fileName, saveOption);
for (int i = 1; i <= convertedDocumentPath.getPageCount(); i++) {
		convertedDocumentPath.save(fileName + i + "." + convertedDocumentPath.getFileType(), i);
}

pdf to image is working but only for 1 page pdf. not multiple page pdf.

that is the issue

what i mean is, a tiff image of more than 1 pages (suppose 3 pages), when getting converted to pdf(multiple pages), the blank page is coming as i have attached the blank converted sample sample.

and I am unable to get the temporary license

@amrit007,

Please note that when you evaluate API in trial mode (without license), you will face such limitations.

Did you follow the wizard here. You will avail temporary license on step 5. Please share the message you get when you process a request using wizard.

Untitled.png (32.0 KB)

what after this?

what is quote number?

@amrit007,

Just go to the next step.
Please find the attached document. Weā€™ve explained each single step to request a temporary license - Wizard.zip (152.9 KB)

thanks for the detail

@amrit007,

You are welcome.