mrvic Posted May 19, 2009 Share Posted May 19, 2009 Hi. I am not asking for the solution provided to me on a silver plate. I am asking for some pointers of how to solve this. I have a series of ODT files. I need to write a PHP script that will do the equivalent of the following (described manually): [*]Read some parameters from the HTML form. [*]Open the document up. [*]Unconditionally replace some unique markers with data from the form. [*]Generate a PDF file. [*]Output the result to the browser. Can that be done with PHP? How? Quote Link to comment https://forums.phpfreaks.com/topic/158799-odt-to-pdf-some-search-and-replacing-needed-is-this-possible-with-php/ Share on other sites More sharing options...
MadTechie Posted May 19, 2009 Share Posted May 19, 2009 This solution may suite you jodconverter But if you want PHP then you could use Open Office COM support, I played with this for about an hour (during my lunch break) and it/I failed, I will probably need to revisit this at some stage. however your need Open Office installed on the Server, If you want a pure PHP ODT to PDF then you could but its it may take a while to write the parse. Quote Link to comment https://forums.phpfreaks.com/topic/158799-odt-to-pdf-some-search-and-replacing-needed-is-this-possible-with-php/#findComment-837575 Share on other sites More sharing options...
mrvic Posted May 22, 2009 Author Share Posted May 22, 2009 Thnks MasTechie. jodconverter is something like what I look for, but not quite. It is ismply file converter. I could just do the convertion by hand and set it up if that tol would do the job for me. I need omething that would enable the find and replace funtionality. Like the DOM function. I will play with it for while. I can arrange for OpenOffice to be installed into headless mode for me in the server. I have no problem with that. As for manually writting the parser, I would rather avoid that. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/158799-odt-to-pdf-some-search-and-replacing-needed-is-this-possible-with-php/#findComment-839933 Share on other sites More sharing options...
MadTechie Posted May 22, 2009 Share Posted May 22, 2009 As your installing OO, (which i think is the best solution but not always possible) then to save some time, you may want to create a macro to do the editing and PDFing, and then just have PHP call those macros, i'm just saying this as it may help, even if you only use the macro to create the PDF (as i think theirs on on their site) Quote Link to comment https://forums.phpfreaks.com/topic/158799-odt-to-pdf-some-search-and-replacing-needed-is-this-possible-with-php/#findComment-839938 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.