[PHP4] pdflib page numbers?
| From: | Curt Siffert | Date: | Sat, 20 May 2000 09:11:43 +0000 |
| Subject: | [PHP4] pdflib page numbers? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227@lists.php.net to get a copy of this message | ||
Hi, first post -
I have a system that dynamically generates a series of html documents
from a database. I want to be able to dynamically generate a pdf
document of all these documents into a book so it can be printed out.
The problem is that these documents have a lot of crosslinking. Like
page 58 might refer the reader back to page 36 for related information
on one topic, or page 79 on another topic. This is for the convience of
those who read the hard-copies. This page-flipping is an integral part
of the set of documents so it isn't an option
to re-engineer that approach.
I'd imagine that each html document would correspond to 2-3 pages of
html text. You can probably imagine the problems this brings up -
pdflib doesn't seem to have a way to return what page number you are on.
Do I actually have to control pdflib through php to the extent of
querying the length of my document contents and breaking in here and
there to manually enter PDF_end_page and PDF_begin_page, or will it
automatically start a new page when a bottom margin is reached? Also,
is there an easier way to determine page numbers of sections other than
cycling through all the documents, counting how many times I have
iterated through "PDF_begin_page" to find page numbers of different
documents, storing that information in php objects, and then throwing
out the pdf document and generating the whole document AGAIN to insert
the page numbers in its crosslink references?
Hope I asked that clearly.
Thanks,
Curt