[mapserver-users] PDF output with layers
Carlos Ruiz
boolean10001 at yahoo.com
Mon Sep 4 07:43:15 PDT 2017
Hey Andy,
The PDF file is not empty, it shows both raster and vector layers. The -mdd LAYERS does not show layers info. I am using MS4W 3.1.3 which, according to the MS4W site has GDAL 2.0.2
On Monday, September 4, 2017, 9:33:07 AM CDT, Andy Colson <andy at squeakycode.net> wrote:
On 09/04/2017 09:20 AM, Carlos Ruiz wrote:
> I'm currently exploring PDF generation from Mapserver and I have noticed that no layers appear to be toggled. First I thought this was because the layer CLASS section has no name (as it happens when legend is generated), but it is not.
>
> gdalinfo test.pdf does not show layers information.
>
> Does anybody know how to configure a MAP file to include layers in the PDF output ?
>
> Here is test.map contents:
>
> MAP
>
> NAME "test"
> EXTENT 657024 2277645 687240 2294128
> SIZE 800 600
>
> OUTPUTFORMAT
> NAME "pdf"
> DRIVER CAIRO/PDF
> MIMETYPE "application/x-pdf"
> IMAGEMODE RGB
> EXTENSION "pdf"
> FORMATOPTION "GEO_ENCODING=ISO32000"
> END
>
> PROJECTION
> "init=EPSG:32613"
> END
>
> STATUS ON
>
> LAYER
> NAME "Landsat 8"
> CONNECTION "http://localhost/cgi-bin/landsat8.exe"
> CONNECTIONTYPE WMS
> TYPE RASTER
> STATUS ON
> METADATA
> "wms_name" "Landsat 8"
> "wms_srs" "EPSG:32613"
> "wms_server_version" "1.0.0"
> "wms_format" "image/jpeg"
> END
> END
>
> LAYER
> NAME "Colonias"
> CONNECTION "..."
> CONNECTIONTYPE POSTGIS
> DATA "geom FROM colonias_amg"
> TYPE POLYGON
> CLASS
> NAME "Colonias"
> STYLE
> COLOR 255 200 150
> OUTLINECOLOR 0 0 0
> END
> END
> COMPOSITE
> OPACITY 35
> END
> STATUS ON
> END
>
> END
>
> Thanks in advance
>
How does the pdf look? Is it empty?
This page:
http://www.gdal.org/frmt_pdf.html
shows the example:
> gdalinfo adobe_style_geospatial.pdf -mdd LAYERS
Does the extra "-mdd LAYERS" help?
Looks like you need GDAL 1.9 or above, what are you on?
-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170904/2e3265c4/attachment.htm>
More information about the MapServer-users
mailing list