Free Support Forum - aspose.com

Converting multi page TIFF to multi page PDF


#1

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 https://docs.aspose.com/display/imagingjava/Converting+Images,
as well as “Extract TIFF Frames to Other Image Format” from https://docs.aspose.com/display/imagingjava/Manipulating+TIFF+Images,
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


#2

@jan.velas,

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


#3

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.


#4

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.


#5

@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.


#6

@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.


#7

That is precisely what I wanted to know.

Thank you both for your time and help.

Regards,
Jan


#8

@jan.velas,

You are always welcome.