On 4 March 2011 08:36, Jorge Gonzalez <[email protected]> wrote:
> If you do another prFile, the Catalyst one gests closed, and you get > nothing, as you are writing somewhere else which Catalyst knows nothing > about. > > With "pdf_filename" in the stash you specify the filename that will be sent > *to the browser* as the preferred name for the attachment, instead of > letting the browser generate one automatically. What error do you get if you > don't specify it? Error between keyboard and chair ;-) My mistake, I had been seeing a 'file not found' error, which I associated with the absence of the pdf_filename. But now, from a working setup, omitting the pdf_filename results in a PDF file being generated with a CVPR-generated default (as per the docs). > > The PDF on the server is spit out on stdout, following the normal Catalyst > information flow (and sent to the browser). > > OTH, specifying the output filename with prFile, when you are using the > module from a web application framework seems a bad idea to me. Input and > output are being hanlded somewhere else... (i.e. Catalyst). That all makes good sense. > Nowhere in the > docs of CVPR states that you have to use prFile to generate the PDF. Equally, nowhere did it say you don't ;-) And the PDF::Reuse docs are quite categorical about it being mandatory so I made the error of assuming that it would be required in the Catalyst use case. > > prFile must be used when you are using PDF::Reuse on a standalone script, as > a mean of getting the generated PDF on disk. But with CVPR, the PDF gets > output directly to stdout (Catalyst handles that!). You just have to design > your PDF, Catalys does everything else for you. > Yes, when it all works it is indistinguishable from magic ;-) But when it is not quite set up right it can be quite hard to see what is going wrong. I need to get some experience in Catalyst's logging, debugging and tracing techniques. thanks, victor _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
