Jump to content
confused and dazed

export mysql data using PHP into a PDF file

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...