Saving to PDF create corrupt pdf document

Hi Support

Aspose.Words seems to have a problem with this document saving to PDF, it returns an out of memory error and the doc is only one page with some graphics, can you advise whats wrong

Clive

Hi Clive,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 11.0.0, I managed to reproduce this exception on my side. I have logged this issue in our bug tracking system. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for inconvenience.

Moreover, this problem is occurring because for some reasons Aspose.Words is failing to render DrawingML image i.e. inside footer of your Word document to fixed page formats e.g. PDF. As a temporary work around, please try using the following code snippet:

Document docx = new
Document(@“c:\temp\20120214-113952937-(1)-1-1.docx”);

MemoryStream docStream = new MemoryStream();
docx.Save(docStream, SaveFormat.Doc);

Document doc = new
Document(docStream);

PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.SaveFormat = SaveFormat.Pdf;
saveOptions.MetafileRenderingMode = MetafileRenderingMode.Bitmap;

doc.Save(@“c:\temp\out.pdf”,
saveOptions);

I hope, this will help.

Best Regards,

The issues you have found earlier (filed as WORDSNET-5867) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.