1 Reply Latest reply on Sep 10, 2014 10:11 PM by peter@pharos.co.nz

    Incorrect file extension in MobilePrint

    Francois Grenier Adventurer

      Hi,

       

      We had a few cases lately of refund requests caused by PDF files that had a .DOC file extension.  Of course, trying to print a PDF file in a text editor generates hundreds of pages of code.  I am not sure how a PDF files magically gets a .DOC extension, but I suspect that Google Docs has something to do with it as I can see "Creator(Google)" in the headers.

       

      Can anyone think of a way in MobilePrint to detect such situation and alert the user or block the file?  We are using UP 8.3 with MP 1.3.2.

       

      Thank you!

       

      -=Francois

        • Re: Incorrect file extension in MobilePrint
          Wayfarer

          Hi

           

          MobilePrint selects the convert to PDF converter based upon filename extensions. The Doc converter is selected for extensions:

          ".txt|.mht|.eml|.ini|.cfg"

          ".doc|.dot|.docx|.rtf"

          ".odt|.ods|.odp"

           

          Unfortunately a file of PDF content that has a .DOC extension will be accepted by the Doc converter as text. (The Doc converter makes it own type assessment based upon content).

          For this particular case we would need to write code to look for the PDF magic start of file string "%PDF-" and treat the file extension as suspect, then process the file as a PDF doc.

          (MobilePrint checks that PDF files can be open and saved as PDFs before accepting them.)

           

          I assume that the page count and price for the submitted doc with PDF content would be very high and the user would notice the high charge?

           

          Regards

          Peter

          2 of 2 people found this helpful