Does the library have an ability to convert a word document to pdf? I'm able to generate the pdf from the template and save as pdf, but i'm wondering if I can just take a non templated word document and just convert it to pdf using the library?
Convert from Word to PDF
0
danvonfeldt
posted this
07 October 2017
I think I got it.
Document doc = Document.Load(inputFilePath);
using (Stream reportDocumentStream = File.Create(outputFilePath))
{
doc.Save(reportDocumentStream, Docentric.Documents.ObjectModel.SaveOptions.Pdf);
}
jles
posted this
07 October 2017
Hi,
Yes, you are correct. Your snippet is the right way to convert a MS Word document to PDF. Note that Docentric Toolkit consists of two parts:
- Reporting (Docentric.Documents.Reporting): Allows you to create a Word document acting as a template and then populated with date from within an application.
- Document Object Model (Docentric.Documents.ObjectModel): Provides DOM and general purpose document processing APIs to parse, convert, merge, split, find/replace, extract images, print documents, ...
Regards, Jure Leskovec
0
danvonfeldt
posted this
08 October 2017
ooh print documents! I'll need that as well, great.