Tiff to PDF Conversion


I m testing conversion from TIFF to PDF, using this code :

try {
//Instantiate Pdf instance by calling its empty constructor
Pdf pdf1 = new Pdf();
//Create a new section in the Pdf object
Section sec1 = pdf1.getSections().add();
//Create an image object in the section
Image image = new aspose.pdf.Image(sec1);
//Add image object into the Paragraphs collection of the section
//Set the ImageStream information
image.getImageInfo().setSystemImage(ImageIO.read(new java.net.URL(“file:////C:/path/TIFF_File.tif”)));
// set the value that all frames of tiff image need be added into PDF document
//Save the pdf document
} catch(Exception e){

I attached the tif file used. Testing with aspose.pdf version 4.4.0 on jdk 1.6.

I m getting back this exception:

java.lang.RuntimeException: This picture is not supported!
at aspose.pdf.c.Abi.a(SourceFile:156)
at aspose.pdf.c.Aba.a(SourceFile:152)
at aspose.pdf.c.Aba.a(SourceFile:99)
at aspose.pdf.xml.Abi.a(SourceFile:208)
at aspose.pdf.xml.Abi.a(SourceFile:669)
at aspose.pdf.xml.Abj.a(SourceFile:578)
at aspose.pdf.xml.Acd.a(SourceFile:804)
at aspose.pdf.xml.Aar.a(SourceFile:104)
at aspose.pdf.xml.Aba.a(SourceFile:113)
at aspose.pdf.Pdf.save(SourceFile:929)
at test_project2.Test2.main(Test2.java:62)

Could you please kindly assist?


Hi Ivona,

Thanks for contacting support.

I have tested the scenario using latest release of Aspose.Pdf for Java 9.5.0 where I have used following code snippet and I am unable to notice any issue. Please try using the latest Document Object Model (DOM) of com.aspose.pdf package and in case you still face any issue, please feel free to contact.

For your reference, I have also attached the resultant PDF generated over my end.


instantiate Document object

Document document = new Document();

// add blank page to PDF file


// create Image object

com.aspose.pdf.Image image = new com.aspose.pdf.Image();

// set path of image file


// add image to paragraphs collection of first page of PDF document


// save the PDF file