I have been experimenting with Gdal 2.2-dev as of generating GeoPdf files.
All of what I have been trying out seems to be working just fine:
-Stacking of multiple raster-layers
-Stacking of multiple vector-layers (with attribute-info)
Though, I have some comments/objections:
When generating a PDF one would expect that it should be possible to control the actual size (in paper-units) of the actually produced PDF.
This will allow for one to do “Print In Actual Size” from Adobe Acrobat Reader yielding a true-scale print (say 1:500).
It would also be nice, if a preferred paper-unit could be specified up front (inch, cm, mm). This could allow for a more precise mappings to A-formats (which I
believe are inherent in PDF).
Currently (as of GDAL 2.2dev) the paper-unit-type is always “inch”, and the actual size (internal properties of PDF) can only be controlled by letting the bottom-most
raster layer presented to gdal_translate have a pixel-size corresponding exactly to the user-unit size (1/72 inch) of the desired PDF paper-size.
I suggest, that gdal_translate should treat a DPI-setting literally: The DPI setting should apply to the bottom raster-layer. All other raster/vector layers are
to be mapped to that “media-box”.
As of WRITE_USERUNIT it is only to provide for a mean to “scale” the resolution. It should be a scale value, to be applied to the default USER_UNIT value of PDF