Is there a preferable way to do the following: A customer wants no more to produce print AND web documents. He decided to only produce web documents of good quality and let the customers print it out if desired. His idea is, to offer a HTML version for browsing and a PDF version for printing. I saw that there are products, which produce HTML code out of PDF files. Are these products stable and usable? Is this a possible professional solution, to let the customer upload a high-resolution PDF file, and let Zope produce a monitor optimized HTML-version of this PDF? _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Stephan Goeldi wrote:
Is there a preferable way to do the following:
A customer wants no more to produce print AND web documents. He decided to only produce web documents of good quality and let the customers print it out if desired. His idea is, to offer a HTML version for browsing and a PDF version for printing.
Sure. I'm doing that using ReportLab.
I saw that there are products, which produce HTML code out of PDF files. Are these products stable and usable?
I haven't used those.
Is this a possible professional solution, to let the customer upload a high-resolution PDF file, and let Zope produce a monitor optimized HTML-version of this PDF?
I suggest storing structured data in your Zope server, and from that producing whatever output formats you need. See the structured text package that comes with Zope for an example of that. -- Steve Alexander Software Engineer Cat-Box limited
Steve, Just a question: Do you make an html/xml page and let reportlab translate it or do you make 2 converters. eg for instance you query across a zsqlmethod and display it in html and for the pdf file, you interate across the same zsqlmethod but create reportlad code. or do you query across a zsqlmethod and display it in html and then the pdf file is created from that page. Thanks, Tom. ----- Original Message ----- From: "Steve Alexander" <steve@cat-box.net> To: <stephan.goeldi@datacomm.ch> Cc: <zope@zope.org> Sent: Thursday, October 18, 2001 11:54 AM Subject: Re: [Zope] Zope and PDF
Stephan Goeldi wrote:
Is there a preferable way to do the following:
A customer wants no more to produce print AND web documents. He decided to only produce web documents of good quality and let the customers print it out if desired. His idea is, to offer a HTML version for browsing and a PDF version for printing.
Sure. I'm doing that using ReportLab.
I saw that there are products, which produce HTML code out of PDF files. Are these products stable and usable?
I haven't used those.
Is this a possible professional solution, to let the customer upload a high-resolution PDF file, and let Zope produce a monitor optimized HTML-version of this PDF?
I suggest storing structured data in your Zope server, and from that producing whatever output formats you need. See the structured text package that comes with Zope for an example of that.
-- Steve Alexander Software Engineer Cat-Box limited
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Tom Deprez wrote:
Steve,
Just a question: Do you make an html/xml page and let reportlab translate it or do you make 2 converters. eg for instance you query across a zsqlmethod and display it in html and for the pdf file, you interate across the same zsqlmethod but create reportlad code.
or
do you query across a zsqlmethod and display it in html and then the pdf file is created from that page.
In the case you describe, I would take the former route. The application I'm using Zope and ReportLab for isn't like this though. I'm generating detailed multi-page PDF reports from data in the ZODB. I'm generating entirely different reports in HTML. -- Steve Alexander Software Engineer Cat-Box limited
On Thu, 18 Oct 2001, Steve Alexander wrote:
A customer wants no more to produce print AND web documents. He decided to only produce web documents of good quality and let the customers print it out if desired. His idea is, to offer a HTML version for browsing and a PDF version for printing.
Sure. I'm doing that using ReportLab.
Steve, Here's something that's crying out for a HowTo. I'm sure there are many folks who would be interested in knowing more about creating PDFs from Zope using ReportLab. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | <dtml-var pithy_quote> | http://linux.com
On Thu, Oct 18, 2001 at 09:12:22AM -0500, Timothy Wilson wrote:
Steve,
Here's something that's crying out for a HowTo. I'm sure there are many folks who would be interested in knowing more about creating PDFs from Zope using ReportLab.
Certainly. Oleg. -- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Timothy Wilson wrote:
A customer wants no more to produce print AND web documents. He decided to only produce web documents of good quality and let the customers print it out if desired. His idea is, to offer a HTML version for browsing and a PDF version for printing.
Sure. I'm doing that using ReportLab.
Steve,
Here's something that's crying out for a HowTo. I'm sure there are many folks who would be interested in knowing more about creating PDFs from Zope using ReportLab.
There's been some talk of this, and some examples, on the ReportLab mailing list. I don't generate PDFs from within Zope. I get Zope to write out a specification file into a directory on the filesystem. This directory is "watched" by a long running python process (the report generator), which looks in a number of directories on the server every 10 seconds to see if there are new files there. These specification files are added to a queue in the report generation software. Reports are generated, and output into a directory that is visible to the outside world via Apache. The reports are given a long unique random filename. Finally, the report generator notifies the Zope that requested the report that the report is ready, and of the filename the report is saved under. When I start running out of disk space, I'll write a script that gets rid of old reports. -- Steve Alexander Software Engineer Cat-Box limited
Hi, I use a different aproach to generate PDF in my simple officemanagement I built with Zope and ZPatterns. On the inputform for my invoice generator I have a button "write invoice", this calls a python script outside of Zope with the invoice-nr as parameter. This python programm gets its data from Zope via xml-rpc, it could also report back to Zope when it is ready. Mit freundlichen Grüßen Joachim Schmitz AixtraWare, Ing. Büro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 On Thu, 18 Oct 2001, Steve Alexander wrote:
Timothy Wilson wrote:
A customer wants no more to produce print AND web documents. He decided to only produce web documents of good quality and let the customers print it out if desired. His idea is, to offer a HTML version for browsing and a PDF version for printing.
Sure. I'm doing that using ReportLab.
Steve,
Here's something that's crying out for a HowTo. I'm sure there are many folks who would be interested in knowing more about creating PDFs from Zope using ReportLab.
There's been some talk of this, and some examples, on the ReportLab mailing list.
I don't generate PDFs from within Zope. I get Zope to write out a specification file into a directory on the filesystem. This directory is "watched" by a long running python process (the report generator), which looks in a number of directories on the server every 10 seconds to see if there are new files there.
These specification files are added to a queue in the report generation software. Reports are generated, and output into a directory that is visible to the outside world via Apache. The reports are given a long unique random filename.
Finally, the report generator notifies the Zope that requested the report that the report is ready, and of the filename the report is saved under.
When I start running out of disk space, I'll write a script that gets rid of old reports.
-- Steve Alexander Software Engineer Cat-Box limited
Joachim Schmitz wrote:
Hi,
I use a different aproach to generate PDF in my simple officemanagement I built with Zope and ZPatterns.
On the inputform for my invoice generator I have a button "write invoice", this calls a python script outside of Zope with the invoice-nr as parameter. This python programm gets its data from Zope via xml-rpc, it could also report back to Zope when it is ready.
That's fine provided these things are true: 1: Your invoice data is immutable. No-one can change it once it has been submitted for printing. 2: You don't have times when there's so many invoices being generated in parallel that it places a high load on the system. 3: You don't mind about the overhead of starting up ReportLab every time you want to generate an invoice. I solve 1 by writing out the changeable data to a file, 2 by having a single queue for generating reports that services all the zope instances on a machine, 3 by keeping a long running process to generate reports. -- Steve Alexander Software Engineer Cat-Box limited
I have a need to create PDF files from a Zope application. I have been reading this thread on PDFs. I have no idea how to start creating pdf files. I have taken a look at reportlab and it looks all a bit too complex for what I want. I just what to convert an HTML doc to a PDF doc. Sounds simple enough. Anyway, could anybody give me some hints as to where I should start. A couple of URLS or how to links. Thanks Tom => -----Original Message----- => From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of => Joachim Schmitz => Sent: Friday, 19 October 2001 5:41 PM => To: Steve Alexander => Cc: Timothy Wilson; stephan.goeldi@datacomm.ch; zope@zope.org => Subject: Re: [Zope] Zope and PDF => => => Hi, => => I use a different aproach to generate PDF in my simple officemanagement I => built with Zope and ZPatterns. => => On the inputform for my invoice generator I have a button "write => invoice", => this calls a python script outside of Zope with the invoice-nr => as parameter. => This python programm gets its data from Zope via xml-rpc, it could also => report back to Zope when it is ready. => => Mit freundlichen Grüßen => => Joachim Schmitz => => AixtraWare, Ing. Büro für Internetanwendungen => Hüsgenstr. 33a, D-52457 Aldenhoven => Telefon: +49-2464-8851, FAX: +49-2464-905163 => => On Thu, 18 Oct 2001, Steve Alexander wrote: => => > Timothy Wilson wrote: => > => > > => > >>>A customer wants no more to produce print AND web => documents. He decided => > >>>to only produce web documents of good quality and let the customers => > >>>print it out if desired. His idea is, to offer a HTML version for => > >>>browsing and a PDF version for printing. => > >>> => > >>Sure. I'm doing that using ReportLab. => > >> => > > => > > Steve, => > > => > > Here's something that's crying out for a HowTo. I'm sure => there are many => > > folks who would be interested in knowing more about creating => PDFs from Zope => > > using ReportLab. => > => > => > There's been some talk of this, and some examples, on the => ReportLab mailing list. => > => > => > => > I don't generate PDFs from within Zope. I get Zope to write out a => > specification file into a directory on the filesystem. This => directory is => > "watched" by a long running python process (the report => generator), which => > looks in a number of directories on the server every 10 seconds to see => > if there are new files there. => > => > These specification files are added to a queue in the report generation => > software. Reports are generated, and output into a directory that is => > visible to the outside world via Apache. The reports are given a long => > unique random filename. => > => > Finally, the report generator notifies the Zope that requested the => > report that the report is ready, and of the filename the => report is saved => > under. => > => > When I start running out of disk space, I'll write a script that gets => > rid of old reports. => > => > -- => > Steve Alexander => > Software Engineer => > Cat-Box limited => > => => => => _______________________________________________ => Zope maillist - Zope@zope.org => http://lists.zope.org/mailman/listinfo/zope => ** No cross posts or HTML encoding! ** => (Related lists - => http://lists.zope.org/mailman/listinfo/zope-announce => http://lists.zope.org/mailman/listinfo/zope-dev ) =>
Tom Cameron wrote:
I have a need to create PDF files from a Zope application. I have been reading this thread on PDFs. I have no idea how to start creating pdf files. I have taken a look at reportlab and it looks all a bit too complex for what I want.
I just what to convert an HTML doc to a PDF doc. Sounds simple enough.
I'm pretty sure the commercial software Acrobat Distiller will do this. Otherwise, if you want to truely own the solution, there's work involved.
Anyway, could anybody give me some hints as to where I should start. A couple of URLS or how to links.
I suggest you join the ReportLab mailing list, and browse through the recent list archives. People *are* doing this sort of thing. In fact, here's a recent email from the ReportLab list: ---- Frederico :
Hi! I need to place some text that comes from a database and it is formatted as html (align, div, font size, li,ol,ul)
My question is: is there an easy way to put this in reportlab maintaining all the aspect? I'm using html parser (python) but i'm tired of so much work, and beside i'm having trouble with the font size...
Well, there's no free lunch. ;-) You must definitely do the parsing yourself, but there should be enough code to help you doing that in Python. You also need to write the mapping, no matter if you map it to Platypus directly or to RML. The latter is certainly more convenient, but also more expensive... Answering this definitely is very difficult as it depends very much on the real HTML you have... You may quickly find that you only get 80-90% of the job done really well, but the rest remains extremely difficult. Regards, Dinu -- Dinu C. Gherman ---- http://reportlab.com Go there now. ReportLab is good. -- Steve Alexander Software Engineer Cat-Box limited
"Tom Cameron" <tom@cameron.to> writes:
I have a need to create PDF files from a Zope application. I have been reading this thread on PDFs. I have no idea how to start creating pdf files. I have taken a look at reportlab and it looks all a bit too complex for what I want.
I just what to convert an HTML doc to a PDF doc. Sounds simple enough.
Anyway, could anybody give me some hints as to where I should start. A couple of URLS or how to links.
There is a really simple solution, at least for the Unix world: html2ps file.html | ps2pdf Using: http://www.tdb.uu.se/~jan/html2ps.html and http://stat.tamu.edu/doc/gs/Ps2pdf.htm To quote the html2ps web page, this will give you: * Many possibilities to control the appearance. * Support for processing multiple documents, also automatically by recursively following links. * A table of contents can be generated, either from the links in a document, or automatically from document headings. * Configurable page headers/footers, that for example can contain document title, URL, page number, current heading, and date. * When converting the PostScript document to PDF - using some other program such as version 5.0 or later of Aladdin Ghostscript, or Adobe Acrobat Distiller - the original hyperlinks in the HTML documents will be retained in the PDF document. * Automatic hyphenation and text justification can be selected. It can handle images and pretty convoluted tables. --- Alastair
On Fri, Oct 19, 2001 at 01:51:04PM +0200, Alastair Burt wrote:
html2ps file.html | ps2pdf
Using:
http://www.tdb.uu.se/~jan/html2ps.html
and
http://www.easysw.com/htmldoc/ Oleg. -- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Here's something that's crying out for a HowTo. I'm sure there are many folks who would be interested in knowing more about creating PDFs from Zope using ReportLab.
There's been some talk of this, and some examples, on the ReportLab mailing list.
I don't generate PDFs from within Zope. I get Zope to write out a specification file into a directory on the filesystem. This directory is "watched" by a long running python process (the report generator), which looks in a number of directories on the server every 10 seconds to see if there are new files there.
These specification files are added to a queue in the report generation software. Reports are generated, and output into a directory that is visible to the outside world via Apache. The reports are given a long unique random filename.
Finally, the report generator notifies the Zope that requested the report that the report is ready, and of the filename the report is saved under.
When I start running out of disk space, I'll write a script that gets rid of old reports.
That's great Steve! If you one day find some time, would you like to write a tutorial on that? Thanks, Tom.
hallo Stephan i wonder if anybody has experience with storing the dokuments as XMLDokuments and view the contents as HTML or PDF. just an idea. gidon Stephan Goeldi wrote:
Is there a preferable way to do the following:
A customer wants no more to produce print AND web documents. He decided to only produce web documents of good quality and let the customers print it out if desired. His idea is, to offer a HTML version for browsing and a PDF version for printing. I saw that there are products, which produce HTML code out of PDF files. Are these products stable and usable? Is this a possible professional solution, to let the customer upload a high-resolution PDF file, and let Zope produce a monitor optimized HTML-version of this PDF?
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (9)
-
Alastair Burt -
Gidon Friedman -
Joachim Schmitz -
Oleg Broytmann -
Stephan Goeldi -
Steve Alexander -
Timothy Wilson -
Tom Cameron -
Tom Deprez