[fpc-pascal] Re: Converting .doc and/or .html to .pdf

Bo Berglund bo.berglund at gmail.com
Sun Jan 30 13:44:18 CET 2011


On Sunday, January 30, 2011 11:07 Andreas Schneider wrote:
>On Sunday, January 30, 2011 09:46 Bo Berglund wrote:
>> The link above goes in the end to a download of *compiled* java code
>> so it is not that good for me. An FPC implementation would be really
>> useful though.
>
>
>The  source  code of jodconverter is available, as you can see on that
>very page I linked (on the bottom ;-)). Automating OOo with FPC is not
>completely  impossible,  but  far  from  trivial. Even if you have the
>necessary  code,  you  still  have  to  setup the ABI between OOos C++
>interface  and  FPC.  That's  essentially  what the current Pascal UNO
>Bridge does. But as I said: far from trivial.
>That's  one  of  the reasons I did all my OpenOffice.org extensions in
>Java ;-)
>
>-- 
>Best Regards,
>Andreas

Right, after I wrote my message I realized I had a WinXP virtual
machine with OpenOffice 3.2 installed, so I downloaded the converter
and tested it using the manual command line commands.

It worked OK to convert a 2-page test document. :-)

I have a question in this context, tha you might answer:
In the description you are directed to starting OpenOffice.org in
headless mode as a socket server. Then the Java application can
connect to it and make the conversion.
But what is NOT specified is how you get rid of the headless running
OpenOffice application...
I don't want it running after I am done with my conversion.
Is there a way except through TaskManager (provided it only loads the
two files exe and bin)???

A will heed your advice concerning the coding and not dive in due to
the complexity. Will instead try to utilize the java function via a
TProcess object such that I can manage the files that are to be
converted.
*That* shouldn't be too difficult to do in Lazarus/FPC...


-- 
Bo Berglund
Developer in Sweden




More information about the fpc-pascal mailing list