Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Converting a Word document to PDF is pretty trivial. Why not concentrate on making Word docs, then convert to PDF as needed? Commented Jan 8, 2015 at 14:24
  • We tried this approach before just this summer. However, it didn't produce PDFs to the standard we were aiming for. We were using JODconverter to convert from Word to PDF and it broke a lot of things - the title page design, hyperlinks, to name a few. Commented Jan 8, 2015 at 15:15
  • 2
    The problem is that the APIs for building Word and PDF documents are so different I don't really know how to best solve this design problem. Trying to find a common interface between Word document APIs and PDF APIs is futile. API design is largely a subjective art; even two APIs for the same kind of document can have substantial differences. If you've already solved the hard part of the problem - creating a format-agnostic document specification - then treat the PdfDocumentAdapter and WordDocumentAdapter as black boxes and give them full control over how the document is generated. Commented Jan 8, 2015 at 16:14
  • Have you looked at Pandoc? Commented Jan 14, 2015 at 10:13