Re: [PHP4BETA] Modifying PDF documents
| From: | Michael Stearne | Date: | Fri, 17 Mar 2000 00:02:46 +0000 |
| Subject: | Re: [PHP4BETA] Modifying PDF documents | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12292@lists.php.net to get a copy of this message | ||
PDFs can't be modified. It's something I needed to do about a year and a
half ago and had to come up with a different solution. If you look at the
PDF spec it details it. The problem is, PDFs are not like other text
documents, there are a lot more like PostScript documents. Pretty much
every character of the page is put exactly where it needs to be. It's
doesn't work like a word processor where if I have a sentence llike:
"This is a sentence."
And the end of the line was after "sentence", if I were to edit that
sentence to say:
"This is a longer sentence."
The word sentence would not wrap to the next line, it would instead go into
the right margin or off the page.
In order to have dynamic documents you need to build the documents from
scratch or (the solution I came up with) build HTML document templates,
make changes to that template and finally convert the HTML to PDF using a
program called HTMLDOC.
If you need more info let me know.
Michael
Mauricio Herrera wrote:
> Hi all
>
> I'm using PHP4B and PDFLib. What I'm trying to do is
> to modify or "edit" PDF documents already created.
> Like inserting text or an image to the document. But
> everytime I call the respective PDF functions, it
> "cleans" the document and starts a new one with the
> inclusions I made. Is this an issue of PHP/PDFlib?
> can't I modify or add things to a PDF already created?
>
> I use the pdf_begin_page to start a new document. But
> when trying to modify one, it displays an error (about
> the order of the functions) if I exclude this
> function. I can't do anything if I not use the
> pdf_begin_page.
>
> Thanks for any advice!
>
> -Mauricio
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net