note 58420 added to ref.pdf
| From: | ontwerpATzonnet dot nl at osu1 dot php dot net | Date: | Thu, 03 Nov 2005 19:01:18 +0000 |
| Subject: | note 58420 added to ref.pdf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98034@lists.php.net to get a copy of this message | ||
I was searching for a lowcost/opensource option for combining static html files [as templates] and
dynamic output from perl or php routines etc. And the sooner or later I found out that this was the
most stable, 'speedest' and customizeable way to produce usable pdf 's with nice
formatting :
1] create html page output [perl-> html output, direct html output from any app or php
echo's etc. [sort these html files locally]
2] parse all html [inluding webimages links, tables font formatting etc] to [E]PS files with the
perl app : html2ps [as mentioned beneath]
http://user.it.uu.se/~jan/html2ps.html [sort
all ps files by future pdf page positions]
3] use the free ps2pdf/ps2pdfwr linux application
http://www.ps2pdf.com/convert/index.htm [uses
gostscript, ghostview libs and so on etc]
Has great formatting options like headers, footers, numbering etc
[sort pdf files]
4] convert all pdf files to 1 pdf file with : pdftk [pdftoolkit], deliveres optional
compressions/encryption, background stamps etc
One should ask why using different scripts :
- combination perl/php is great : perl is speedier at some issues like conversion to ps files in my
experience
- ps to pdf is quickier then direct php to pdf [in my exp.!]
- I have total control over every files whenever i change html files as a template I use only
editors or other app. for it [online or offline].
p.s. I had to make a opensource solution for creating simpel report analyses that's based on
things like :
- first page [name / title / #/ date]
- some static info [like introduction, copyrights etc]
- some dynamic info [outputted from php->dbase queries] combined
with html tags/images etc.
And this all mixed [so seperated in files for transparancy]. Also the 3 way manner : data-> html,
html->ps, ps->pdf, is easier and quickier to program or adjust in every step.
Correct me if i'm wrong [mail me to]
ing. Valentijn Langendorff
Design & Technologist
----
Manual Page -- http://www.php.net/manual/en/ref.pdf.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58420
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58420&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58420&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58420&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58420&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58420&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58420&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58420&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58420&report=yes
Search -- http://master.php.net/manage/user-notes.php