Hi,
I have used Aspose.pdf and and in pdf am creating the images.Its working finr in windows but in linux am getting the following error
java.lang.RuntimeException: This picture is not supported!
at aspose.pdf.figure.Abk.a(SourceFile:101)
at aspose.pdf.figure.Abc.a(SourceFile:220)
at aspose.pdf.xml.Abh.a(SourceFile:225)
at aspose.pdf.xml.Abh.a(SourceFile:434)
at aspose.pdf.xml.Abi.a(SourceFile:576)
at aspose.pdf.xml.Acd.a(SourceFile:796)
at aspose.pdf.xml.Aar.a(SourceFile:97)
at aspose.pdf.xml.Aba.a(SourceFile:112)
at aspose.pdf.Pdf.getBuffer(SourceFile:1654)
at aspose.pdf.Pdf$getBuffer.call(Unknown Source)
The code am using is as follows:
Pdf pdf = new Pdf()
//add a section
Section sec1 = pdf.getSections().add()
// create an image object
Image img1 = new Image(sec1)
// set image
img1.getImageInfo().setSystemImage(img)
// specify the image file type
img1.getImageInfo().setImageFileType(ImageFileType.Png)
// Center aligning the image
img1.getImageInfo().setAlignment(AlignmentType.Center)
// add image to paragraphs collection of Section object
sec1.getParagraphs().add(img1)
// specify the image height information equal to Section height minus Top and Bottom margin of page
img1.getImageInfo().fixHeight = sec1.pageInfo.pageHeight - sec1.pageInfo.margin.Top - sec1.pageInfo.margin.Bottom
// specify the image Width information eqaul to Section Width minus Left and Right margin of page
img1.getImageInfo().fixWidth = sec1.pageInfo.pageWidth - sec1.pageInfo.margin.Left - sec1.pageInfo.margin.Right
byte[] pdfBuffer = pdf.getBuffer()
ByteArrayInputStream pdfStream = new ByteArrayInputStream(pdfBuffer)
Please help me where am stuck.