[Zope] Displaying a pdf file.

J Cameron Cooper jccooper at jcameroncooper.com
Fri Aug 15 22:37:16 EDT 2003


>
>
>This works fine however I have a new requirement for #3.  Instead of displaying the data back to the user in html, I am to take the data add disclamer pages (total 4-5 pages) and display it to the user in pdf format.
>
>To do this I plan to do the following after the user hits 'save':
>  1) save the data in the oracle database
>  2) call and external procedure that will run an oracle report to create the report,
>     save it as a pdf file on the local unix file system (ex. 'myfile.pdf').
>  3)?? THIS IS WHERE I NEED HELP ??
>      I now need some way of having the user view this pdf file.
>
>Am I over complicating this?  From zope can I just call a url (even if its on another web server that displays) the pdf.
>
>I don't really need it in zope to view it, do !?
>  
>
Zope has nothing to do with viewing anything. Zope just serves it.  The 
question is how.

1. you can save it to the FS and use a product like I previously 
mentioned (probably LocalFS) to get to and serve it. Since you're doing 
it dynamically, that's probably not the best idea.
2. just have your external method return the contents of the file. Be 
sure to name the method something.pdf to get around IE's brokenness.
3. skip the database entirely and have Zope generate the PDF for you. If 
you have no explicit dependency on using that Oracle report program, you 
can look at something like

http://www.reportlab.com/toolkit/
http://www-106.ibm.com/developerworks/linux/library/l-sc6.html?loc=dwmain
http://zope.org/Members/Dirk.Datzert/RenderableCharts/view
http://zope.org/Members/gaaros/ZpdfDocument/zpdfannounce/view
http://zope.org/Members/jack-e/CMFReportTool/view
http://zope.org/Members/gaaros/ZpdfDocument/view
http://mail.zope.org/pipermail/zope/2002-January/106265.html

             --jcc




More information about the Zope mailing list