[mapserver-users] PDF output and file naming (.pdf)
Donald Kerr
donald.kerr at dkerr.co.uk
Wed Jun 25 07:15:48 PDT 2014
This is what I use (with some notes):
# PDF
# Required to change MIMETYPE for outputting PDFs as application/x-pdf
OUTPUTFORMAT
NAME "pdf"
DRIVER "CAIRO/PDF"
# MIMETYPE "application/x-pdf" # Original
MIMETYPE "application/pdf" #MIME type of "application/pdf" for
pdfs as "application/x-pdf" not always recognised as pdf by browser
IMAGEMODE "RGBA"
EXTENSION "PDF"
TRANSPARENT ON # Requires RGBA, not RGB otherwise errors. Also
requires OFFSITE 255 255 255 in LAYER
END
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Basques, Bob
(CI-StPaul)
Sent: 25 June 2014 15:12
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] PDF output and file naming (.pdf)
All,
I got the PDF output to work, but the outputted file ends up being output as
<some_name>.map.
I'm using CGI (streaming result?) with map.imagetype=pdf, the result is
indeed a PDF, but with a .map file name.
I tried setting EXTENTION "pdf" and MIMETYPE "application/x-pdf" inside of
FORMATOPTION to no effect as far as the file name tag. Do I maybe need to
output temporarily to a server location (WEB) for subsequent download?
Thanks
bobb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140625/9835c8c3/attachment.htm>
More information about the MapServer-users
mailing list