Converting multi page TIFF to multi page PDF

Hello,

is it possible to create a multi page PDF from multi page TIFF, using only Aspose.Imaging?

I’m using the Java version of Aspose.Imgaing, version 19.3, on 64 bit system.

I have tried various examples from original documentation, but didn’t quite find an example for this scenario.
I tried to use " Converting RasterImage to PDF" from Convert Images using Java Image Processing Library|Documentation,
as well as “Extract TIFF Frames to Other Image Format” from Manipulating TIFF Images|Documentation,
but the resulting PDF always ended up with only 1 page.

Is it possible to generate multi paged PDF documents from TIFF, using Aspose.Imaging only?

Thank you for any answer,
Jan

@jan.velas,

Can you please share source file and expected output so that we may investigate this on our end to help you out.

Of course.
The source files come from a scanning application, with a “.pg” extension, but to my knowledge are regular TIFFs and can be viewed as such after changing the file extension to “.tiff”.

TIFF Sample.zip (1.3 MB)

The expected output is a PDF with same pages as the input TIFF.
Unfortunately, I can not share the actual output file (with only 1 page) at the moment, because there are some issues with access to the machine where I developed the application on.
It should be fixed today.

I’m back with the actual output for the source file I provided.

PdfOutput.pdf (97.6 KB)

As you can see, it only contains the first page.

The core code used to generate this PDF is:

Image image = Image.load(task.getDocDir() + “\” + mainDocument);
File pdfFile = TaskFilesTool.createUniqueFile(task.getDocDir(), Constants.CONVERTED_FILE_NAME);
image.save(pdfFile.getAbsolutePath(), new PdfOptions());

I hope this info will help you.

@jan.velas,

I have observed your requirements and regret to share that at present the requested support is unavailable in API. A ticket with ID IMAGINGNET-3364 has been created as in our issue tracking system as a new feature request. Our development team will look into the possibility of implementation of the requested feature. This thread has been associated with this new feature request, so that you can be automatically notified as soon as this issue is resolved.

@jan.velas,

I have observed your requirement of exporting multi page TIff to multi page PSD. As far as Aspose.Imaging is concerned, it allows you toexport individual Tiff frames to individual PDF. Later, you can then use Aspose.PDF to merge the individual PDF files. The other option is to use Aspose.PDF directly in this regard that allows reading TIFF file and generating PDF for that.

That is precisely what I wanted to know.

Thank you both for your time and help.

Regards,
Jan

@jan.velas,

You are always welcome.

The issues you have found earlier (filed as IMAGINGNET-3364) have been fixed in this update.