Crimpage Posted May 16, 2006 Share Posted May 16, 2006 Hey everyone,I'm starting to do some work where dynamic PDF creation would be REALLY helpfull. I have played a bit but just with standard, write text, continue text and place image etc...What I will be doing, is outputting a report to a PDF where the data could be 1 line, 2 paragraphs or 2 pages.How can I work out how much of the page was taken up by the text, then put a border around it etc...Any info is appreciated.Thanks,David. Quote Link to comment https://forums.phpfreaks.com/topic/9743-dynamic-pdf-creation/ Share on other sites More sharing options...
Barand Posted May 16, 2006 Share Posted May 16, 2006 Have you looked at FPDF?[a href=\"http://www.fpdf.org\" target=\"_blank\"]http://www.fpdf.org[/a]Its cell() and multicell() functions will output text and put the border round it. Quote Link to comment https://forums.phpfreaks.com/topic/9743-dynamic-pdf-creation/#findComment-36330 Share on other sites More sharing options...
Psycho Posted May 17, 2006 Share Posted May 17, 2006 What is your process for creating the PDFs? Are you pasing an HTML page to a PDF library function or are you creating dynamic psotscript files and distilling them?If you are doing the former, you will need to use strict styles within the HTML page to control the output. For example, knowing that there are 72 pixels (or points) per inch. So if you want 1" margins on the sides you should create a table with an exact width of 72 x 6.5. And then specify an exact point size for the font. Then put a border on the containing table(s). Depending on the type of format for your data, you may or may not be able to control page breaks (there is a CSS control for page breaks).If you are building the PDFs by creating postscript first, you have FULL control over all elements. You would just need to learn PostScript programming! Quote Link to comment https://forums.phpfreaks.com/topic/9743-dynamic-pdf-creation/#findComment-36639 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.