[Zope] Zope/Plone Form Question
Andreas Jung
lists at zopyx.com
Wed Nov 29 15:05:04 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- --On 29. November 2006 09:40:40 -0500 "Christopher A. Nethery"
<can at wasmerschroeder.com> wrote:
> Hello all,
>
>
>
> I have created:
>
>
>
> - a Controller Page Template
>
> - a Controller Validator script and,
>
> - a Controller Python script
>
>
>
> I am trying to create a form whose values are used by a script to:
>
>
>
> - query a separate reporting system
>
> - generate a .pdf document with the resulting report and,
>
> - post the contents of the .pdf to a results page
>
Upon successful validation you redirect to a script (see CMFFormController
docs) that calls something like that:
pdffile = getPDFData(....)
R = context.REQUEST.RESPONSE
R.setHeader('content-type', 'appliction/pdf') # check that
R.setHeader('content-length', str(len(pdffile))
R.write(pdffile)
Depending on your app you can also use a file_stream_iterator() instead of
the last write() call. Google for details.
- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFFbefwCJIWIbr9KYwRAslzAJ9mcUb09x7aKibuZkMpMZfwEUXweACg3DBt
WCc4kyXEY3+e4M+ntD/YxA0=
=iSox
-----END PGP SIGNATURE-----
More information about the Zope
mailing list