Error in generating image from pdf.

Discussions about image processing and document imaging.
Post Reply
kamalT
Posts: 2
Joined: Mon Nov 16, 2015 8:40 pm

Error in generating image from pdf.

Post by kamalT » Mon Nov 16, 2015 8:57 pm

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.
Attachments
Form2.zip
(646.42 KiB) Downloaded 65 times

Cedric
Posts: 259
Joined: Sun Sep 02, 2012 7:30 pm

Re: Error in generating image from pdf.

Post by Cedric » Thu Dec 10, 2015 4:46 pm

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!

kamalT
Posts: 2
Joined: Mon Nov 16, 2015 8:40 pm

Re: Error in generating image from pdf.

Post by kamalT » Thu Dec 10, 2015 4:49 pm

Hello,
Thanks for the response. Are there any plans of supporting it in future? Any ETA in that regard.
Thanks,
Kamal.

Cedric
Posts: 259
Joined: Sun Sep 02, 2012 7:30 pm

Re: Error in generating image from pdf.

Post by Cedric » Thu Dec 10, 2015 5:04 pm

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.

mgolland
Posts: 7
Joined: Tue May 10, 2016 10:48 am

Re: Error in generating image from pdf.

Post by mgolland » Tue Feb 07, 2017 12:52 pm

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

Cedric
Posts: 259
Joined: Sun Sep 02, 2012 7:30 pm

Re: Error in generating image from pdf.

Post by Cedric » Tue Feb 07, 2017 1:00 pm

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.

mgolland
Posts: 7
Joined: Tue May 10, 2016 10:48 am

Re: Error in generating image from pdf.

Post by mgolland » Tue Feb 07, 2017 7:04 pm

Ok, thanks for the quick reply

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest