Our first iteration was server side rendering to PDF using PHP - it was
very slow and because the client had an interactive application with an
agent online to a customer we scrapped that approach
(- it was slow since there is an intermediate step of rendering HTML to
PS which sucks and also has big time font issues)
Our current approach which works very well is print to PDF in the
browser by the agent and use PHP as the template engine. The
workstations are fast enough to render the HTML to PDF in a few
seconds. Another tip - be careful with fonts and encoding - use fixed
encoding in Web server and fixed fonts in the template and dont use
esoteric fonts just because they look good in HTML
- they may not render consistently to PDF
Danny
Youval Bronicki wrote:
Danny,
Thanks for the info. The formatting problems you have reported keep
me focused on OpenOffice (and JooReports).
In your system, are the PDF files created automatically by the server,
or are they "printed to PDF" manually by end-users? Do you simply use
PHP as the template engine?
Youval
Danny Lieberman wrote:
Yuval
You can do this in PHP .
We just did an application for generating business documents
(proposals etc...)
for a call center that use SugarCRM with Firefox, XML, templates and
a merge with the mysql db, the output from browser prints to PDF Creator
which is then transferred to a FaxoIP server for faxing internationally.
Not to hard to develop - however, it is a heckofa lot of work on the
formatting side - page breaks, margins etc and keeping all the
workstations in the network on the same configuration.
We used some CSS classes for print documents - mileage varys widely
Best regards
Danny
Youval Bronicki wrote:
Hello all,
[This is not strictly a Linux question. I hope it will be of
interest to the list.]
I am developing an enterprise application that will generate various
business documents (invoices, purchase orders, RFQs). The documents
should be printable (and pretty), and also be available in soft copy.
Requirements:
A) Documents should be generated automatically by "merging"
dynamic content with pre-designed document "templates"
B) Designing document templates should be easy (A WYSIWYG
approach is required).
C) Resulting documents should be printable.
D) (Not strictly a must) - being able to send the documents to
users who don't have Microsoft Office.
I am researching the options, and the choice turns out to be difficult
The easiest implementation would be to use Microsoft's InfoPath:
- Pros: The document instances are simple XML files
- Cons: Not cross platform, not open source, young product,
doesn't support D.
An alternative will be to Adobe LiveCycle Forms (where a server
component will merge data and templates to create PDF files).
- Pros: Output documents are widely accessible XML files; the
template definition file use a published specification (Adobe's XDP)
- Cons : A proprietary and probably expensive solution.
I haven't found an open source alternative. I've used apache FOP in
the past but it doesn't support Hebrew (yet). Designing the
XSLT/XSL-FO templates was a little nightmare.
I am also considering using a combination of Mozilla and PDFCreator
to generate PDF from XML/HTML & CSS, but I'm afraid it will require
too much effort to set up. The idea seems to be an old one (
http://london.pm.org/pipermail/london.pm/Week-of-Mon-20021111/014912.html,
http://www.planetpdf.com/forumarchive/56738.asp), but I haven't
found reports of implementation.
Any insight will be most welcome
Youval Bronicki
http://www.tersus.org
http://www.tersus.com
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]
--
Danny Lieberman
Visit us at http://www.software.co.il
Office + 972 8 970-1485
Cell + 972 54 447-1114
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]