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

Free Support Forum - aspose.com

Aspose.Pdf document SaveOptions

I have tried to save my document in html, doc and pdf. See code below.

document.Save(@“c:\Temp\pdffile.pdf”, SaveFormat.Pdf);

document.Save(@“c:\Temp\pdffile.html”, SaveFormat.Html);

document.Save(@“c:\Temp\pdffile.doc”, SaveFormat.Doc);

I did not get any output in html or doc format. I only got the pdf output. See attached output from the above statements.


which Aspose.Pdf Version do you use?

I have tried with v (latest version) and all is fine.

Could you provide the source PDF file (or your code to generate the PDF document)?

I am also using the new version Aspose.Pdf which now supports page overflow feature that was not working in prior release.

Hi Lawrence,

Thanks for contacting support.

Can you please share the complete code snippet which you are using for PDF/DOC/HTML conversion. In your attached .zip file, I can see the 3 resultant files (doc and HTML are blank) but code snippet is missing.

We apologize for this inconvenience.

Here is the project to demo SaveOptions issue.

Hi Lawrence,

Thanks for sharing the sample project.

Please note that Aspose.Pdf for .NET supports the feature to generate PDF document and it also provides the feature to load existing PDF file and render it as DOC/HTML and other formats. So as per your requirement, first you need to save the output in PDF format, then load recently created PDF into separate Document instance and then try rendering the output in DOC and HTML format. Please try adding following code lines in CreatePdf(XmlDocument xmlData) method inside your project.

For your reference, I have also attached the resultant files generated over my end.



return pdf document memory stream

MemoryStream pdfMemoryStream = new MemoryStream();

// document.Save(@"c:\pdftest\pdffile.html", SaveFormat.Html);

// document.Save(@"c:\pdftest\pdffile.doc", SaveFormat.Doc);

document.Save(@"c:\pdftest\pdffile.pdf", SaveFormat.Pdf);


Document doc2 = new Document(pdfMemoryStream);

doc2.Save(@"c:\pdftest\pdffile.doc", SaveFormat.Doc);

document.Save(@"c:\pdftest\pdffile.html", SaveFormat.Html);

return pdfMemoryStream;

Thank you for your help. It appears that your code does work.

Hi Lawrence,

Thanks for the acknowledgement.

We are glad to hear that your problem is resolved. Please continue using our API and in the event of any further query, please feel free to contact.