Create your PDF however you like then send a page of MIIME type x-pdf (check the exact type). There are Perl modules for directly creating PDF as well but iit doesn't matter how your output buffer gets a PDF into it.
-----Original Message----- From: "Jerry Kaidor" <je...@tr2.com> Sender: cgiapp-boun...@lists.erlbaum.net Date: Mon, 2 Sep 2013 22:09:47 To: <cgiapp@lists.erlbaum.net> Reply-To: CGI Application <cgiapp@lists.erlbaum.net> Subject: [cgiapp] Output PDF instead of HTML? Hello, I have an application I've been writing and using now for some years, in support of my business. I use CGI::Application, and the login and authentication plugins. It sometimes would be nice to be able to serve PDF data instead of HTML. These are not disk files: they are PDF reports that are algorithmically generated. ( Generally, I use perl to generate TeX and convert it to PDF with pdflatex ). I have done some web searching, and nothing jumps out at me, with the possible exception of something in CGI.pm about being able to specify different or custom headers. When I try that, the "custom headers" wind up as text inside an html wrapper. Quite useless. Is there something about CGI::Application and the login plugin that restricts output to HTML? I suppose I could try redirection: user clicks on the "create a PDF" link, the system responds by creating the PDF, storing it on disk in a temp location, and returning a browser redirect to make the browser get the temp file. Ick. - Jerry Kaidor ( je...@tr2.com ) ##### CGI::Application community mailing list ################ ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## ################################################################ ##### CGI::Application community mailing list ################ ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## ################################################################