Questions Tagged With documenthttps://answers.axonivy.com/tags/document/?type=rss&user=mhoffmannquestions tagged <span class="tag">document</span>enWed, 14 Aug 2019 06:13:37 -0400Is the DocumentFactory able to convert *.docx to *.pdf?https://answers.axonivy.com/questions/3919/is-the-documentfactory-able-to-convert-docx-to-pdf<p>For a curernt application, we have the requirement to convert <em>.docx and </em>.doc files to a *.pdf file and append a page. Can this be done with the DocumentFactory or do we have to implement this by utilizing other tools?</p> <p>The Aspose API should be able to do that, but I couldn't find an example on the Jira page for the DocumentFactory.</p> <p>Edit - due to a <a href="https://answers.axonivy.com/questions/2526/aspose-evaluation-only-message">related question</a>, I could answer it myself. Both scenarios are possible by utilizing Aspose directly.</p> <pre><code> Document doc = new Document("C:\\Users\\m.hoffmann\\Documents\\Die Kultur im Sudetenland.docx"); DocumentBuilder docBuilder = new DocumentBuilder(doc); docBuilder.moveToDocumentEnd(); docBuilder.insertBreak(BreakType.PAGE_BREAK); docBuilder.writeln("Dies ist ein Beispielausgabetext, welcher mit Aspose eingefügt wurde"); docBuilder.getDocument().save("C:\\Users\\m.hoffmann\\Documents\\asposeOutputEdited.pdf", SaveFormat.PDF); </code></pre>mhoffmannWed, 14 Aug 2019 06:13:37 -0400https://answers.axonivy.com/questions/3919/is-the-documentfactory-able-to-convert-docx-to-pdfdocument