|
Tips
|
|
Written by Jason Meunier | Tuesday, 08 June 2010 16:34
|
|
In a recent project, I was tasked with creating PDFs from Word documents. As you already know, creating PDFs from printable Servoy objects is not too hard, but creating from documents that Servoy stores or manipulates is not as straightforward. With the help of two open source projects, I was able to create a system that converts documents to PDFs (or to other types of documents as well).
The steps to setup a PDF converter:
-
Create an OpenOffice service (or run OpenOffice headless).
-
Create a JODConverter web service on the Application Server.
-
Write code in Servoy to utilize the web service, passing a document to the web service and receiving the PDF from the web service.
Please login or register to see the full article |
Comments
From what Jason said, you can also use the lib version of JOD, so no need to rush and buy stuff that some free resource can do
Unless you really don't know what to do with your money in which case I know an Open Source developer who accepts contributions
As for POI writing the PDF, probably not, but I guess a combination of POI + iText or POI + xslt could be used.
My two cents
I think I will buy it and will have a try
This works in both Mac and Linux (much easier actually because you can just run OOo headless) It is kind of hidden in the text because it takes SOOOOO much to make it work as a service in Windows.
I currently have it running on a Mac and my client is running it on Linux now.
Not sure if Apache POI will actually write the PDF or not.
Harjo, I agree that it would be nicer to do this from a straight plugin and not invoke a OOo service. I have not tried your suggestion, maybe worth a look.
I see that this is Windows only though.
And it seems a lot of conditions (OpenOffice service, JOD Web Service) to make this all work, which IMHO is a bit fragile. I wonder if there's no other ways using Apache POI for example, or the the Java library needs all these pieces to work too...
Interesting anyway.
Something I would definitely like to explore... when I find some time
RSS feed for comments to this post.