Hi,
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
sec1.getParagraphs().add(image);
//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
image.getImageInfo().setTiffFrame(-1);
//Save the pdf document
pdf1.save(“C:\path\TIF-ImageConversion.pdf”);
} catch(Exception e){
e.printStackTrace();
}
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?
Regards