Re: Multipage PDF with pdflib ?
| From: | Rasmus Lerdorf | Date: | Wed, 22 Nov 2000 20:58:00 +0000 |
| Subject: | Re: Multipage PDF with pdflib ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26695@lists.php.net to get a copy of this message | ||
Just put multiple pdf_begin_page() and pdf_end_page() blocks in your code
and it should work.
-Rasmus
On Wed, 22 Nov 2000, Alessandro Rossi wrote:
>
> I would like to know if is possible to create multipage pdf document with
> pdflib support enabled.
>
> all the examples I found are for 1 page only.
>
>
> The following code I have used doesn't work:
>
>
> $pdf = PDF_open();
> pdf_set_info_author($pdf, "Alex Rossi");
> PDF_set_info_title($pdf, "Test");
> pdf_set_info_creator($pdf, "See Author");
> pdf_set_info_subject($pdf, "Test");
> PDF_begin_page($pdf, 595, 842);
> PDF_add_outline($pdf, "Item ");
> pdf_set_font($pdf, "Helvetica-Bold" , 20, winansi);
> pdf_set_text_rendering($pdf, 0);
> pdf_show_xy($pdf, "Test Page",50,780);
> PDF_show_xy($pdf, "Item : Test " , 100, 700);
> PDF_show_xy($pdf, "Description : Test ", 100, 620);
>
> $im = PDF_open_jpeg($pdf, "test.jpg");
> pdf_place_image($pdf, $im, 100, 300, 3);
> pdf_close_image ($im);
>
> pdf_stroke($pdf);
> PDF_end_page($pdf);
>
>
> PDF_begin_page($pdf, 595, 842);
> PDF_add_outline($pdf, "Item ");
> pdf_set_font($pdf, "Helvetica-Bold" , 20, winansi);
> pdf_set_text_rendering($pdf, 0);
> pdf_show_xy($pdf, "Test Page2",50,780);
> PDF_show_xy($pdf, "Item : Test " , 100, 700);
> PDF_show_xy($pdf, "Description : Test ", 100, 620);
>
> $im = PDF_open_jpeg($pdf, "test2.jpg");
> pdf_place_image($pdf, $im, 100, 300, 3);
> pdf_close_image ($im);
>
> pdf_stroke($pdf);
> PDF_end_page($pdf);
>
>
>
>
>
> PDF_close($pdf);
>
>
>
>
>
> Anyone cna please help ???
>
> Alex
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>