Aspose pdf not working in linux but working in windows

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.

Hi Vijayakumar,


Thanks for using our products.

I have tested the scenario using Aspose.Pdf for Java 3.0.1 over RedHat Linux Enterprise 5 where I have following JRE installed and as per my observations, I am unable to notice any problem. The image is properly being placed inside the PDF document. Can you please share which version of Aspose.Pdf for Java you are using and also please share the sample image that you are using. We are really sorry for your inconvenience.

java version "1.6.0_17"
OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

Hi,

Thanks for your prompt reply

The version we are using is aspose-pdf-2.8.0-jdk16.jar.We are using the png image and this images we stored in database as blob and in runtime we retrieve that from db and use that in pdf. The sample image is attached for your reference.

Thanks & Regards

Vijay