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

Free Support Forum - aspose.com

Problem converting .docx to .pdf

Hello

I have an OEM license for Aspose.Total. When I feed a certain .docx file in, I get a .pdf out that has embedded images missing. Please see attached and the code below. What am I doing wrong?

Also, the output file doesn't seem to preserve formatting well (spaces). Any thoughts?

Thanks

Mike

Aspose.Words.License lic = new Aspose.Words.License(); lic.SetLicense("Aspose.Total.lic");

Aspose.Pdf.License lic2 = new Aspose.Pdf.License(); lic2.SetLicense("Aspose.Total.lic");

sourceFile = "Word2007TextwImages.docx";

outputFile = "Word2007TextwImages.pdf";

FileToPDF(sourceFile, outputFile, Aspose.Words.LoadFormat.Docx);

private string FileToPDF(string sourceFile, string targetFile, Aspose.Words.LoadFormat sourceFormat)

{

string tempXml = Path.ChangeExtension(targetFile, ".xml");

Aspose.Words.Document doc = new Aspose.Words.Document(sourceFile, sourceFormat, null);

doc.Save(tempXml, Aspose.Words.SaveFormat.AsposePdf);

Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();

pdf.BindXML(tempXml, null);

pdf.Save(targetFile);

return targetFile;

}

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

Thanks for your inquiry. I managed to reproduce this problem in my side and created new issue #6011 in our defect database. I will notify you as soon as it is fixed.

Best regards.

Thanks Alexey

The natural next question is - how long until a fix is made/posted?

Thanks

Mike

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

Thanks for your inquiry. Currently I can’t provide you any estimate. Please expect a reply before next hotfix (within 3-4 weeks).

Best regards.

Hi Alexey,

I am sure you have already seen this - there was another difference between the original and the PDF output in that blank lines are removed. I hope this problem was also seen when the image issue was reproduced.

Thanks

Mike

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

Thanks for your request. I see that spacing between paragraphs is changed, so I created new issue #6102 in our defect database. Also there is one more known issue.

Issue #5313 - Font is changed from Calibri to Times New Roman after converting DOCX to DOC.

Best regards.

We are happy to tell you that we released new version of Aspose.Words. This version includes fix of issue you found earlier (issue # 6011). Aspose.Words 6.0 supports the full set of DrawingML used by Microsoft Word 2007. You can download new version from here:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry154627.aspx

Best regards.

The issues you have found earlier (filed as 5313;6102) have been fixed in this update.


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