[Mapserver-users] raster layers in PDF output don't get cropped

Rusty Holleman rusty at main.nc.us
Wed Oct 1 16:06:35 EDT 2003


Curious if anyone else has seen this sort of behavior.  I'm
running mapserver 4.0, gd 2.0.12, PDFlib Lite 5.0.1.

I have a map that composites several images, then draws roads
on top.  It works great when I render to PNG, but if I render
to PDF the raster data spills all over the page.  Watching
acroread display the file, as it displays each raster layer
the image is intact but all of the page outside the image
bounding box gets colored with some color from the image,
overwriting previous raster layers.

If I add the formatoption OUTPUT_TYPE=RASTER, then I get mostly
what I want except that places that are transparent (i.e. it
falls on an offsite pixel for all of the raster layers) end
up red rather than white.  This can be circumvented by placing
a small all-white image at the lowest layer, with no offsite
value.  Of course, setting OUTPUT_TYPE=RASTER defeats much of
the purpose of rendering to PDF anyway, so this is not really
a solution.

Any ideas?  Any other details I should post?

thanks,
rusty





More information about the mapserver-users mailing list