Inserting mysql values directly into pdf using x,y coordinates.
Any suggestions for a resource to insert database values directly into pdf using x,y coordinates, preferably in php? I have a form that needs to be populated with information contained in a database. The form cannot be altered in any way.
a google search gave me this: http://www.sitepoint.com/generate-pdfs-php/ and i was also able to find TCPDF. Will these work? Are there better solutions开发者_如何转开发 out there?
Based on my experience i would like to suggest you to try fpdf library. It provides goods features as well as examples for beginners.
I am not sure I understand what you are trying to do. If you have a PDF with a form inside, and you are trying to fill the form with data and save the PDF with the filled forms, try this here:
http://koivi.com/fill-pdf-form-fields/
its pretty self-explanatory.
On the other hand, if you try to create a new PDF file, I can also recommend the fpdf library.
As an added hint: I often came to the conclusion that it can be also very easy to make a HTML file, add the CSS for page breaks and then convert that into PDF at the client computer with a print-to-PDF function. It saves you from bending your output to fit the limitations of PDF libraries.
精彩评论