Our company allows its customers to view reports through our website. Pages are based on php, and data is collected from MySQL. These reports were written long ago and include inline css. The pages themselves look great, but the print version is not enough. I want to accept reports and create visually appealing “printed” pages containing our branding.
I have found three solutions so far.
@Media Print Stylesheets
This is the easiest way, but does not give me full control over the layouts. I need landscape mode and need to control where the page break occurs, so this method was excluded from my list of possible solutions. Reports are created by cyclizing through PHP data, so although I can always put a page break after or, for example, I cannot stop a page break before it gets to the next data set.
TCPDF / FPDF
From what I saw, these classes will give me all the control I need for a PDF client. The challenge is that this seems to be a bit more advanced than what is required for programming, and all the inline CSS contained in the HTML tables can discard the formatting.
Fdf
, . PDF , MySQL. FDF, . PDF, , PDF 2.
, ? "", ?
.