Skip to main content
Participant
November 24, 2009
Question

Reading a PDF

  • November 24, 2009
  • 1 reply
  • 615 views

Can cf8 read a pdf and automatically open it to the browser?

    This topic has been closed for replies.

    1 reply

    Inspiring
    November 24, 2009

    No. ColdFusion can do lots of things with PDF files: read, write, generate, protect, watermark etc. But in the end, ColdFusion runs on the server and not on the users browser. So while we can read a PDF on the server and sent it to the browser, it is the end user who is in control of what the browser does with that PDF. It is the end user who decides whether the file is opened, saved or ignored.

    Inspiring
    November 24, 2009

    If CF can read the PDF on the server,

    is there any way to show the contents of the PDF on the browser.

    We are trying to make it, so a client can upload a PDF to a specific folder, and have the text read and displayed on a cfm page.

    ilssac
    Inspiring
    November 24, 2009

    If the PDF is not locked or protected, yes you could read the file, extract the text and display it in HTML or some other format.

    But one does have to ask why?  Why not just deliver the PDF which many have their browser set up to disply in-line anyways?

    Message was edited by: Ian Skinner My favorite overview of CF PDF functionality. http://www.coldfusionjedi.com/index.cfm/2007/7/9/ColdFusion-8-Working-with-PDFs-Part-1