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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.