0

Hi.

I'm doing exporting from .php to .pdf now and face a little problem here.

I've found something like below and I think it might be helpful for me to do exporting to pdf.

<?php
$mypdf = PDF_new();
PDF_open_file($mypdf, "");
PDF_begin_page($mypdf, 595, 842);
$myfont = PDF_findfont($mypdf, "Times-Roman", "host", 0);
PDF_setfont($mypdf, $myfont, 10);
PDF_show_xy($mypdf, "Sample PDF, constructed by PHP in real-time.", 50, 750);
PDF_show_xy($mypdf, "Made with the PDF libraries for PHP.", 50, 730);
PDF_end_page($mypdf);
PDF_close($mypdf);
PDF_delete($mypdf);
?>

However, in my .php file, it's including display of table. (and I cant get anything about that in tutorials I've found so far)

How can I do to have the table in pdf?

Thanks in advance. Have a nice day =P

2
Contributors
1
Reply
3
Views
8 Years
Discussion Span
Last Post by digital-ether
0

Hi.

I'm doing exporting from .php to .pdf now and face a little problem here.

I've found something like below and I think it might be helpful for me to do exporting to pdf.

<?php
$mypdf = PDF_new();
PDF_open_file($mypdf, "");
PDF_begin_page($mypdf, 595, 842);
$myfont = PDF_findfont($mypdf, "Times-Roman", "host", 0);
PDF_setfont($mypdf, $myfont, 10);
PDF_show_xy($mypdf, "Sample PDF, constructed by PHP in real-time.", 50, 750);
PDF_show_xy($mypdf, "Made with the PDF libraries for PHP.", 50, 730);
PDF_end_page($mypdf);
PDF_close($mypdf);
PDF_delete($mypdf);
?>

However, in my .php file, it's including display of table. (and I cant get anything about that in tutorials I've found so far)

How can I do to have the table in pdf?

Thanks in advance. Have a nice day =P

What PDF library are you using? They should have documentation on how to include HTML.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.