Thread: PDF

    #1
  1. No Profile Picture
    Gardener
    Guest
    Devshed Newbie (0 - 499 posts)
    I have a question about the PDF functions.

    Is it possible to load a PDF document created by Quark Express (or similar) and add new things to it?

    An answer would be most appreciated.

    /Gardener

    [This message has been edited by Gardener (edited 07-20-99).]
  2. #2
  3. No Profile Picture
    nole
    Guest
    Devshed Newbie (0 - 499 posts)
    Try Acrobat 4.0 supposedly it enables modification (post-it notes on top of pdf documents) of pdf files after they have been created. Not sure what this has to do with PHP however.
  4. #3
  5. No Profile Picture
    Gardener
    Guest
    Devshed Newbie (0 - 499 posts)
    Yeah, I know I can do that, but I want to dynamically update PDF-documents with PHP, but if I understand the manual correctly, that is not possible.

    Would it somehow be possible to convert a PDF-document into PHP, with functions creating the same document? If that was possible, I could just add the functions for adding the dynamic content.

    /Gardener
  6. #4
  7. No Profile Picture
    gash
    Guest
    Devshed Newbie (0 - 499 posts)
    I'm not 100% sure of what exactly it is that you want to do but ill give it a shot.
    If you mean that you need to alter the information in a .PDF file with information comming from, lets say a web page, that must surely be possible, since you can load and peek to both an in and out file.
    It will offcourse require you to know the .PDF format so that you can read the data the right way. But otherwise I really cant see why it wouldnt be possible.

    Basically make a program that,
    - Locks in and out file.
    - Reads X bytes into in file and then compares data to find the desired info.
    - Then simply peek to this point with a variable and start reading out, or putting in your new data.
    - Release the files and make a clean exit.

    Maby it will help, I hope so.
    /gash
  8. #5
  9. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    Gash, I think you're going a little too low-level. PHP provides functionality for manipulating PDF documents in their native format (not binary). See: http://www.php.net/manual/ref.pdf.php3

    Gardener, it appears you're right that there's no way to load an existing PDF and change its contents. But it does sound like you're on the right track with creating the document in PHP to start. Keep the dynamic source content in a database and have a function that calls PHP's PDF functions to pull the current info from the database and spit out PDFs on demand.
  10. #6
  11. No Profile Picture
    gash
    Guest
    Devshed Newbie (0 - 499 posts)
    I really had no idea about the "pdf functions" in php. Didnt think there where any. Very interesting, must look into it. thnx jpenix
  12. #7
  13. No Profile Picture
    Gardener
    Guest
    Devshed Newbie (0 - 499 posts)
    Okey, thanks jpenix.

    I will have to look into how I can "translate" a pdf-document that I have into PHP-PDF-functions. I want it to look very similiar, preferably exactly the same. It won't be easy to layout a document only by using the PDF-functions.

    But I'll give it a try if no-one has any other suggestions.

    /Gardener

Similar Threads

  1. PDF creation from another PDF
    By gunja99 in forum PHP Development
    Replies: 0
    Last Post: August 5th, 2003, 06:34 AM
  2. Links to multiple destinations in pdf file.
    By Andrew Clark in forum HTML Programming
    Replies: 0
    Last Post: July 25th, 2003, 03:52 AM
  3. PDF - Capturing events in PDF forms
    By tigreye007 in forum Visual Basic Programming
    Replies: 3
    Last Post: June 20th, 2003, 09:53 AM
  4. PDF Rendering & Mac's = One Man Attack
    By dave981 in forum PHP Development
    Replies: 2
    Last Post: May 8th, 2003, 03:23 AM
  5. readfile($filename) with PDF file problem
    By gunja99 in forum PHP Development
    Replies: 1
    Last Post: May 8th, 2003, 02:53 AM

IMN logo majestic logo threadwatch logo seochat tools logo