On Fri, Sep 23, 2005 at 03:30:29PM +0000, Mark Stosberg wrote:

> On 2005-09-22, Evan A. Zacks <[EMAIL PROTECTED]> wrote:
> 
> > If the user has CGI::Application version 4 or newer, and he does
> > not request any symbols for import, pdf_output() is automatically
> > installed as a postrun callback. This allows for transparent
> > conversion from html to pdf:
> >
> >   use CGI::Application::Plugin::Output::PDF;
> >
> >   # ...
> >
> >   return $template->output; # sent to browser as pdf
> 
> I would rather an explicit conversion call be required by default,
> since one run mode out of ten may need a PDF conversion.
> 
> People who want auto-conversion for every run mode can request that:
> 
>   use CGI::Application::Plugin::Output::PDF qw/:auto_convert_all/;
> 
> That would be uncommon in my own use.

Thanks for the insight. I agree that it would be unusual to want
pdf output for all runmodes. If that were desired, then the user
might be better off using PDF::Template directly, for example.

Cees Hek had an interesting idea yesterday -- allow the user to
specify a form parameter that controls whether or not to generate
pdf output. In the configuration phase, the user can set a form
field, say 'pdf_output', that will be examined in the postrun
callback installed by this plugin. (A reasonable default will be
supplied)

If that form field is set (by the browser), then pdf conversion
will take place. Otherwise, the postrun callback won't do
anything. This allows the programmer to use the plugin without
needing to explicitly call the pdf output conversion method.

Another related suggestion was to allow the user to specify a
list of runmodes where pdf output would be allowed (or
disallowed). Does anyone have a preference for which would be
better (or if we should have both)?

Thanks,
-E

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to