Error in generating image from pdf.
Error in generating image from pdf.
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.
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 393 times
Re: Error in generating image from pdf.
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!
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.
Hello,
Thanks for the response. Are there any plans of supporting it in future? Any ETA in that regard.
Thanks,
Kamal.
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.
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.
I will fill in a request for the development though.
Re: Error in generating image from pdf.
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
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.
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.
Ok, thanks for the quick reply
Who is online
Users browsing this forum: Bing [Bot] and 1 guest