[Qgis-developer] Multilayer PDF ?

Hugo Mercier hugo.mercier at oslandia.com
Fri Feb 7 00:17:32 PST 2014

Hi Larry,

Le 06/02/2014 19:31, Larry Shaffer a écrit :
> Hi Hugo,

> What about generating individual PDF outputs for each 'layer' (i.e. a
> layer or group of layers in layer legend) first, then combining them
> into a PDF as layers?

Hmmm, that could also work :)

> This is totally untested, but when using GDAL to generate a geospatial,
> layered PDF, could the individual 'layer' PDF outputs be piped back into
> GDAL as DATASOURCEs for individual layers? There seems to be a set order
> for generating the layers, e.g. raster on bottom with vector layers over
> top, instead of random instertion, e.g. raster on bottom, then vector,
> then raster. You might want to ask Mr. Warmerdam about how flexible the
> PDF layer writing process is, and whether external PDF content can be
> streamed through to layered output (instead of having any geometries
> read and styled). There is the EXTRA_STREAM=content creation option, but
> I don't know if it can be used multiple times to insert external PDFs as
> layers.

Thanks for this. I have to dig deeper GDAL's PDF writing capabilities,
but it seems promising.

> Also, I think the blending modes of individual layers/groups would have
> to be migrated to PDF-specific (Postcript?) definitions, since each will
> be rendered separately. Surely standard blending modes for layers can be
> defined in PDFs (?).

That would not be that easy to correctly support blending modes. There
is something in the PDF reference related to standard blending modes,
but I have no idea yet how it could be linked to layers ...

Hugo Mercier

More information about the Qgis-developer mailing list