At 7:09 PM +0100 3/2/02, Christian Frantsen wrote:
>[- $sub = Execute ({object => 'include/sub.epl'}); -]
>
><html>
>   [- Execute('*', $sub); -]
></html>
>
>
>This prints the PDF file to the browser but I get the raw data enclosed in
><html></html> tags.
>What do I have to do to get the PDF file sent to the client as a PDF and not
>an HTML file?

[$ if someconditionspecifictopdf $]
        [- Execute('*', $sub); -]
[$ else $]
        <html>
                [- Execute('*', $sub); -]
        </html>
[$ endif $]

Since some browsers ignore the filename= option on the content type, 
I've found that it's best to do something like.

        <a href="foo.html/test.pdf">Link to PDF</a>

Then your if condition looks like:
[$ if ($ENV{PATH_INFO} =~ /\.pdf$/) $]

-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED]

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to