Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Printable Output
- Alan M Dunsmuir
November 16, 2007, 9:15 am
rate this thread
Re: Printable Output
I don't know about "standard", but for one customer I am creating .pdf
files on the fly. He can then forward them by email or print them as he
wishes, using the integration of Adobe and Outlook Express (windows).
The library is public domain and can be found at http://www.ros.co.nz/pdf/
You will not like how page throws are handled! You can't know you need
to take a new page, until you over stepped the bottom of the page. The
work around is ugly - you detect that you are now on a new page, discard
back to the last check point, head the new page, and then output the
stuff you threw away again. Yeuk, but it works.
I ended up writing an adapter pattern so I could write lots of
$text = "Please find below q.... ": // build a paragraph in $text
$text .= ".\n";
$pdf->ezText($text,$size,$opts); // add it
} while ($pdf->endsOnNewPage($this,'headpage'));
loops to send out the bits between possible break points.
It means I can forget all about driving printers, fax machines, or
emailing the results. I have included his (colour) letterhead, with its
image, so he prints on plain paper, with no line-up problems. The code
even get the addresses to appear in the window of the envelope every time.