Free Support Forum - aspose.com

Converting from Docx to Pdf

Hello,

I am trying to convert from Docx to Pdf. I am getting no errors but the generated Pdf file is empty.

I am using the following code:

Document srcDoc = new Document(saveTmpDirectory + bestand.Name);

srcDoc.SaveOptions.ExportImagesFolder = @"F:\Temp\generateWord\";

srcDoc.SaveOptions.HtmlExportImagesFolderAlias = @"F:\Temp\generateWord\";

srcDoc.Save(saveTmpDirectory + nieuweBestandsNaam + ".xml", SaveFormat.AsposePdf);

// een pdf bestand maken van het word bestand

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

pdf.BindXML(saveTmpDirectory + nieuweBestandsNaam + ".xml", null);

pdf.IsImagesInXmlDeleteNeeded = true;

pdf.Save(saveTmpDirectory + nieuweBestandsNaam + ".pdf");

I have added the docx file which I am trying to convert.

Hi,

I have tested your document and was able to reproduce the error. However upon inspection of the xml file generated by Aspose.Words I found that the xml represented a blank page. So the problem is in the xml generated by Aspose.Words. Please report this issue on the Aspose.Words forum.

Thanks.