How to render a multi TIFF to PNG in Java

Hi ,

When I try to view any multitiff file it shows me only first image. It does not show other images. Could you please let me know how multitiff behaves in gorupdocs.

Regards,’
Arwa

1 Like

@1001769

Can you please provide the following details:

  • API variant that you are using (Java or .NET)
  • API version (e.g. 19.10, 20.4)
  • Sample code
  • Source and output files

We are using Java version 1.8
Groupdocs conversion 19.4 jar

@1001769

We’d recommend you to use latest release of the API that is 20.7. We can render a multi-paged TIFF file to multiple PNGs. Have a look at the sample code:

License lic = new License();
lic.setLicense("D:\\license file");
String outputDirectory = ("D:\\");
String pageFilePathFormat = new File(outputDirectory, "page_{0}.png").getPath();
PngViewOptions viewOptions = new PngViewOptions(pageFilePathFormat);

Viewer viewer = new Viewer("D:\\multipage_tiff_example.tif");
viewer.view(viewOptions);
viewer.close(); 

Here.zip (1.8 MB) you can download sample and output files.

ok thanks will try out and let you know if I face any further issues.

Regards,
Arwa Kurawar

1 Like

@1001769

You’re welcome.