Could you lead me to the documentation on how to export document as a pdf?
Could you lead me to the documentation on how to export document as a pdf?
Hi,
If you are looking for a way to specify the output format with DocumentaGenerator when generating a report from a template document, then you can use one of the GenerateDocument overloads that accepts SaveOptions:
http://www.docentric.com/documentation/programming/reference-guide/docentric.documents.reporting/documentgenerator
http://www.docentric.com/documentation/programming/reference-guide/docentric.documents.reporting/documentgenerator/generatedocument3
myDocumentGenerator.GenerateDocument("MyTemplate.docx", "GeneratedDocument.pdf", Docentric.Documents.ObjectModel.SaveOptions.Pdf);
But if you would like to know how to convert an arbitrary Word (.docx) document to a PDF, use the code snippet below:
using Docentric.Documents.ObjectModel;
Document document = Document.Load(@"c:\MyWordDocument.docx");
document.Save(@"MyPdfDocument.pdf");
Let me know if any of the above is the answer to your question.
Best regards,
Jure Leskovec
Thanks! The Xml.Linq.SaveOptions was clouding my view:)