Fellow monks

I have recently been given the task of creating an online tool to compare the text on two files. Problem is that not all files will be text files - some may be docx some doc etc.

So i started my task - done everything needed for the compare of two text files (including upload to the server running the perl CGI) and all is well.

Now it's time to handle when the uploaded file is not a plain text file. And problems arise.

At first i tried running LibreOffice via open with the convert-to command line option - that works well outside CGI mode but under CGI mode i can't execute LibreOffice (due to privilege restrictions to the server i guess) - the script just dies with no error message.

Then i looked into Win32::OLE, but the server is Linux and that module is Windows only.

Then i looked into OpenOffice::UNO but i can't find any information on that for perl and i have tried it on python and same happens as with running LibreOffice - works well in normal mode but move it to CGI and loadComponentFromURL makes the script die with no message

Anyone has any other way to achieve this? is it at all possible to do? Any help would be appreciated


In reply to Convert documents in CGI <SOLVED> by 537mfb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.