Reading PDF Files with PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dunnm@inhs.org

    #1

    Reading PDF Files with PHP

    This is probably a more appropriate location to post this question. I
    should have know that since I've found most of the other PHP/PDF
    information contained in this group.

    Here's my issue...I will from time to time receive 4 - 5 PDF files into
    a directory; I want to be able to schedule a task which will pick up
    these 4 - 5 PDFs, read through them and then generate 1 pdf. Creating
    PDFs in PHP is obviously fairly easy, however I haven't found anything
    yet that will actually read the PDFs so that I can then place that
    content into this new single file. Can this be done with PHP. Any
    suggestions/help would be greatly appreciated.

    Thank you in advance.

  • yaheew

    #2
    Re: Reading PDF Files with PHP





    <dunnm@inhs.org > wrote in message
    news:1103593644 .453446.91580@z 14g2000cwz.goog legroups.com...[color=blue]
    > This is probably a more appropriate location to post this question. I
    > should have know that since I've found most of the other PHP/PDF
    > information contained in this group.
    >
    > Here's my issue...I will from time to time receive 4 - 5 PDF files into
    > a directory; I want to be able to schedule a task which will pick up
    > these 4 - 5 PDFs, read through them and then generate 1 pdf. Creating
    > PDFs in PHP is obviously fairly easy, however I haven't found anything
    > yet that will actually read the PDFs so that I can then place that
    > content into this new single file. Can this be done with PHP. Any
    > suggestions/help would be greatly appreciated.
    >
    > Thank you in advance.
    >[/color]


    Comment

    • Chung Leong

      #3
      Re: Reading PDF Files with PHP

      <dunnm@inhs.org > wrote in message
      news:1103593644 .453446.91580@z 14g2000cwz.goog legroups.com...[color=blue]
      > This is probably a more appropriate location to post this question. I
      > should have know that since I've found most of the other PHP/PDF
      > information contained in this group.
      >
      > Here's my issue...I will from time to time receive 4 - 5 PDF files into
      > a directory; I want to be able to schedule a task which will pick up
      > these 4 - 5 PDFs, read through them and then generate 1 pdf. Creating
      > PDFs in PHP is obviously fairly easy, however I haven't found anything
      > yet that will actually read the PDFs so that I can then place that
      > content into this new single file. Can this be done with PHP. Any
      > suggestions/help would be greatly appreciated.
      >
      > Thank you in advance.
      >[/color]

      Reading from PDF files is almost impossible. You can extract bits and piece
      from one and make small changes here and there. There's no way for a
      computer to read the document in its entirety because the logical structure
      of the text isn't there. What a PDF file contains is essentially
      instructions to the printer--that is, the visual representation of the
      document. A paragraph in a PDF, for instance, is just a series of moveTo(72,
      72), printLine(text) , moveto(72, 144), printLine(text) commands. To get back
      the original paragraph of text you would need OCR-like artificial
      intelligence.

      What IS possible is stitching a number of PDF files into one. It would just
      be a matter of reading in the PDF objects (without actually decoding the
      content sterams), writing them to a new file, then update appropriate
      reference tables. If you have the inclination, go the Adobe's web site and
      download the reference manual.


      Comment

      Working...