We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Update Generate PDF code from 3.3 to 3.9. doesn't work

Hi,

I have been using ASPOSE since a year and more and familiar with all the properties and functionalities.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have upgraded my code for PDF from 3.3.2.0 to 3.9.0.0 version. Now when I generate the PDF it says “There was an error opening this document. The file is damaged and could not be repaired.”

Please help me I need to upgrade this to get the new functionalities.

Thanks,

Sandeep

Hi Sandeep,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I am not sure why you are facing this problem. Please share the code snippet that you are using to generate the Pdf file, so that we can test the issue at our end.

We apologize for your inconvenience.

Thanks for the quick replay

Here is my code snippet.

This doesn't open the PDF File any more.

objPDF.Save("ClientApprovalReports.pdf", Aspose.Pdf.SaveType.OpenInAcrobat, HttpContext.Current.Response)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


This works fine and saves to my desk.
objPDF.Save("ClientApprovalReports.pdf")

I retested back to 3.3 version and it works fine. I tried wit 3.7 and 3.8 aswell. It all has the same issue.

Kindly help me.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the scenario using Aspose.Pdf 3.9.0.0 and I am unable to notice the problem. I have tested the issue with following code snippet. Please share the complete code/project so that we can investigate the cause of issue in details.

[C#]

Pdf pdf1 = new Pdf();
//Create a section in the Pdf object
Section sec1 = pdf1.Sections.Add();
//Create an image object in the section

Aspose.Pdf.Image image1 = new Aspose.Pdf.Image(sec1);
//Add image object into the Paragraphs collection of the section
sec1.Paragraphs.Add(image1);
//Set the path of image file
image1.ImageInfo.File = "C:/pdftest/LogoPiscina.jpg";
//Set the type of image using ImageFileType enumeration
image1.ImageInfo.ImageFileType = ImageFileType.Jpeg;
//Set image title
image1.ImageInfo.Title = "JPEG image";

//Save the Pdf
pdf1.Save("ClientApprovalReports.pdf", Aspose.Pdf.SaveType.OpenInAcrobat, HttpContext.Current.Response);