Page 1 of 1

Error in generating image from pdf.

Posted: Mon Nov 16, 2015 8:57 pm
by kamalT
Hello There,
We are using GDPicture to generate and save as JPEG from pdf. one of our pdf files that we get from external source is not able the generate the image from pdf using gd picture. The code is given below and the pdf is attached.

GdPicturePDF _gdPicturePdf = new GdPicturePDF();
GdPictureStatus status = _gdPicturePdf.LoadFromFile(filePathtextBox.Text, true);

if (_gdPicturePdf.GetPageCount() > 0)
{
using (GdPictureImaging gdPictureImaging = new GdPictureImaging())
{
int imageId = 0;
status = _gdPicturePdf.SelectPage(1);
_gdPicturePdf.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitPoint);
VerifyStatus(status, "Failed to select first page in Pdf document.");
imageId = _gdPicturePdf.RenderPageToGdPictureImage(96.0f, false);
gdPictureImaging.SaveAsJPEG(imageId, _tempOutputFile);
if (_gdPicturePdf != null)
{
VerifyStatus(_gdPicturePdf.GetStat(), "Failed to save image to jpeg.");
}
imagepanel.BackgroundImage = System.Drawing.Image.FromFile(_tempOutputFile);

}
}

Thanks,
Kamal.

Re: Error in generating image from pdf.

Posted: Thu Dec 10, 2015 4:46 pm
by Cedric
Hello,

This is because this PDF form is a actually a PDF/XFA document, a proprietary XML based Adobe standard that usually comes from Adobe LiveCycle Designer.
As is has not been recognized as an ISO standard, we do not support this standard at the moment.

Cheers!

Re: Error in generating image from pdf.

Posted: Thu Dec 10, 2015 4:49 pm
by kamalT
Hello,
Thanks for the response. Are there any plans of supporting it in future? Any ETA in that regard.
Thanks,
Kamal.

Re: Error in generating image from pdf.

Posted: Thu Dec 10, 2015 5:04 pm
by Cedric
Not at the moment, full support of it is probably impossible as it is still proprietary technology from Adobe.
I will fill in a request for the development though.

Re: Error in generating image from pdf.

Posted: Tue Feb 07, 2017 12:52 pm
by mgolland
Hi,

Has there been any further investigation into XFA support? Currently all PDF/XFA files are rendering with the standard Adobe warning message:

''If this message is not eventually replaced by the proper contents of the document, your PDF
viewer may not be able to display this type of document...."

Regards,

Mark

Re: Error in generating image from pdf.

Posted: Tue Feb 07, 2017 1:00 pm
by Cedric
Adobe XFA is not an open specification and it will be dropped within the next PDF standard revision. So we basically have no plan to support it at the moment.

Re: Error in generating image from pdf.

Posted: Tue Feb 07, 2017 7:04 pm
by mgolland
Ok, thanks for the quick reply