[mapserver-users] High resolution printing

Robert Sanson SansonR at asurequality.com
Tue Sep 30 16:16:13 PDT 2008


Thanks Stephen. I solved it (crudely) by changing mapserv.exe to mapserv.pdf in my cgi-bin directory.
 
Robert

>>> Stephen Woodbridge <woodbri at swoodbridge.com> 1/10/2008 1:15 p.m. >>>
Sounds like you need to issue an HTTP header(s) like:

Content-Disposition: filename=mapserver.pdf

but, I'm not sure how to do that from mapserver without some additional 
research.

-Steve W

Robert Sanson wrote:
> 
> I am using OpenLayers to formulate the Mapserver request for a PDF map, 
> specifying the output resolution in pixels. I read somewhere that 
> default Mapserver is compiled with up to 4000x4000 pixel images? If you 
> need higher than this, you have to set some variables in the source code 
> and recompile.
>  
> Anyway, I get a PDF generated, but my problem is that it comes back with 
> a filename of mapserv.exe and my Browser won't recognise it as a PDF. 
> How can I open the PDF in a new window automatically, so I can print it?
>  
> Thanks,
>  
> Robert Sanson
> 
>  >>> Dan Little <danlittle at yahoo.com> 1/10/2008 10:42 a.m. >>>
> If you'd like a PHP approach to this problem you can check out the 
> GeoMOOSE project, and our print.php script.
> 
> It uses GD and FPDF.
> 
> 
> 
> ----- Original Message ----
>  > From: Rob McCulley <RMcCulley at county24.com>
>  > To: mapserver-users at lists.osgeo.org 
>  > Sent: Tuesday, September 30, 2008 4:33:37 PM
>  > Subject: RE: [mapserver-users] High resolution printing
>  >
>  > I'm working on the same thing right now.  The first option is to
>  > generate a high resolution raster image from mapserver and then user
>  > reportlab to put that into a .pdf.  The problem with this is the file
>  > size of the resulting .pdf is large, and the vectors still don't look as
>  > good as they could.
>  >
>  > What I've been working on now is using reportlab and svglib.  I create a
>  > high resolution .jpg of just the raster layers from mapserver, and then
>  > I create an .svg file of the vector layers.  I use svglib to convert the
>  > .svg file into a reportlab graphics object, and draw that on top of the
>  > raster into a .pdf document.  The file size is still large, but the
>  > vectors look much better.  The problem I'm having now is that not all of
>  > mapservers labeling options are available to svg output (namely, you
>  > can't wrap labels).
>  >
>  > http://www.reportlab.org/ 
>  > http://pypi.python.org/pypi/svglib/0.6.0 
>  >
>  >
>  > Rob McCulley
>  > GIS Coordinator
>  > County of Vermilion River
>  >
>  >
>  > -----Original Message-----
>  > From: mapserver-users-bounces at lists.osgeo.org 
>  > [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Brent
>  > Fraser
>  > Sent: Tuesday, September 30, 2008 3:16 PM
>  > To: Milo van der Linden
>  > Cc: mapserver-users
>  > Subject: Re: [mapserver-users] High resolution printing
>  >
>  > Milo,
>  >
>  >     It will likely involve several changes to Mapserver's mappdf.c
>  > (see
>  > http://lists.osgeo.org/pipermail/mapserver-users/2008-April/055593.html)
>  > . 
>  >
>  > Brent Fraser
>  >
>  > Milo van der Linden wrote:
>  > > Hello list!
>  > >
>  > > I have been searching the web for tips and tricks, but basically what
>  > I
>  > > need is a method or procedure or (commercial) tool that can enhance my
>  >
>  > > mapserver installation to enable high resolution printing.
>  > >
>  > > What I am looking for is the best practice to:
>  > >
>  > > - Add a button to our website
>  > > - Let the button start a script or program that processes the active
>  > > layers in the map view based upon the current extent
>  > > - Generate a mixture of high-res images and optionally svg or alike
>  > for
>  > > linework
>  > > - combine the works in a pdf
>  > > - present the pdf for download to the user
>  > >
>  > > I would also like to know if there are any commercial, mapserver
>  > based,
>  > > solutions for this. I am also willing to hire an expert to achieve
>  > this.
>  > >
>  > > Any ideas?
>  > >
>  > > Kind regards,
>  > >
>  > > Milo van der Linden
>  > > _______________________________________________
>  > > mapserver-users mailing list
>  > > mapserver-users at lists.osgeo.org 
>  > > http://lists.osgeo.org/mailman/listinfo/mapserver-users 
>  > >
>  > _______________________________________________
>  > mapserver-users mailing list
>  > mapserver-users at lists.osgeo.org 
>  > http://lists.osgeo.org/mailman/listinfo/mapserver-users 
>  > _______________________________________________
>  > mapserver-users mailing list
>  > mapserver-users at lists.osgeo.org 
>  > http://lists.osgeo.org/mailman/listinfo/mapserver-users 
> 
> 
> 
>      
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users 
> 
> 
> 
> 
> ------------------------------------------------------------------
> The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.
> ------------------------------------------------------------------
> 
> 
> 
> This message has been scanned for malware by SurfControl plc. 
> www.surfcontrol.com <http://www.surfcontrol.com/>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users 


------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081001/64a3e249/attachment.htm>


More information about the MapServer-users mailing list