in reply to Convert documents in CGI <SOLVED>

The closest to document conversion is OpenOffice / LibreOffice in command line mode, and/or antiword (which can't handle docx due to its age). I suggest that you have *Office running as a daemon script that looks in a drop directory for files to convert, and have the CGI script submit new conversion jobs to it, and fetch the results.

Replies are listed 'Best First'.
Re^2: Convert documents in CGI
by 537mfb (Initiate) on Jun 22, 2011 at 13:19 UTC

    Yes - i have been looking into the LibreOffice option - like i mentioned

    not sure how to make it run as daemon and keep looking in the drop directory - can't be every X minutes cause it need to output the result on upload and not x minutes later but will look into that now

    maybe keep a perl script ran as root running in the background (not CGI), checking the folder and when new file is found execute the converter - will see

    thanks for the reply

      Well, I got this problem solved.

      Case anyone needs a hint on a similar problem, what i did was use a socket server script over TCP using use IO::Socket::INET and having it always on running as root, and it handles requests to convert files from the CGI script that in this case is a client.

      Thank you for the help.