Jump to content

export mysql data using PHP into a PDF file


confused and dazed

Recommended Posts

Hello internet.

My next task is to try and pull data from mysql using PHP and place that information into a table in a PDF file format. Everything I have found when I searched on the topic leads me to believe this is an extremely advanced form of coding and I am certainly not on that level. Is there software or something out there that you can point me to, to help create these PDF files from data in mysql?

Link to comment
Share on other sites

For creating PDF files in general you should look into the FPDF library at fpdf.org. Creating PDF files with that is sort of similar to creating something between an HTML table and a line drawing. You'll get the data from MySQL the same way you always do. Instead of displaying it on a page you'll create a new PDF document and then either output it to the browser or save it as a file. Note that a script that outputs a binary file like a PDF or image cannot have any other output, like HTML or text or anything else. It needs to be dedicated to just creating and outputting that file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...