开发者

Ways to export Tables/Views from mySQL Database to printer friendly format (other than phpMyAdmin)

开发者 https://www.devze.com 2022-12-15 01:27 出处:网络
I\'ve created a bunch of views in a database and I\'d like to export them to pdf. However phpmyadmin lets me only put a title on each page and it\'s very limited to how i can layout the output.

I've created a bunch of views in a database and I'd like to export them to pdf. However phpmyadmin lets me only put a title on each page and it's very limited to how i can layout the output.

does anybod开发者_StackOverflow社区y have some recommendations of software/scripts they used?


tcpdf is a PHP class for generating pdf documents. They have many example scripts.


There are a fantastillion ways to do this, some ideas:

export csv, import it to your favorite spreadsheet editor, format it, get the pdf using a pdf printer.

export xml, process it using xsl-fo to produce the output you want ( hacking required, fun )

export html ( should work? ), put a css on top optimized for print layout, pdf-printer.


Usually, I write up a script to pull info from a database, then generate a .csv, attach it to an email and send it on its way. Most scripts with support for mySQL can do that and they also go as far as generate a .pdf file with the appropriate formatting (in my case, I use Ruby, so I could have used Prawn to generate a PDF - I just choose not to as of this time).

0

精彩评论

暂无评论...
验证码 换一张
取 消