Skip to main content
Known Participant
April 30, 2009
Question

CFPDF action="getinfo" and HP MFP error

  • April 30, 2009
  • 1 reply
  • 1327 views

Sometimes programming errors seem to require a full moon and standing on one leg to reproduce, but I have found a consistent error between HP and ColdFusion.

<cfpdf action="getinfo"...>

Will sometimes fail with an "invalid document" error because it can't find a creation date when the document is created my Hewlett Packard MPF (Powered by xmp)

I have not been able to find documentation on this error.  Anyone know about it?

    This topic has been closed for replies.

    1 reply

    Participant
    July 16, 2009

    I'm having this problem as well.  When I open the PDF in Acrobat and view document properties, it says the "Application" is "PaperPort http://www.scansoft.com" and the "PDF Producer" is "sspdflib 1.0 http://www.scansoft.com".  The "Created" date is empty.  Any ideas on how to get around this?  For me, the worst part is that I don't even care about the created date, I just need the number of pages!  Thanks!

    Inspiring
    July 16, 2009

    If you have access to createObject(), try using a bit of iText. Something like this:

    <cfscript>
    pdfReader = createObject("java", "com.lowagie.text.pdf.PdfReader").init(fullPathToInputFile);
    totalPages = pdfReader.getNumberOfPages();
    </cfscript>

    Also, could upload the file? I would like to see if the issue still exists in CF9.

    Removed reference to javaLoader