[gdal-dev] DPI for printing in geospatial PDF

Even Rouault even.rouault at spatialys.com
Tue Aug 2 00:37:00 PDT 2016


Jack,

Your use case makes sense. The current behaviour is such that when reading, 
the GDAL PDF driver can retrieve the original size in pixels.

I've just committed an improvement that will enable the user to select which 
behaviour he wants.

Here's the doc of the new creation option:

WRITE_USERUNIT=YES/NO: (GDAL >= 2.2)
Whether the UserUnit setting computed from the DPI (UserUnit = DPI / 72.0)
should be recorded in the file. When UserUnit is recorded, the raster size in
pixels recognized by GDAL on reading remains identical to the source raster.
When UserUnit is not recorded, the printed size will depends on the DPI value.
If this parameter is not set, but DPI is specified, then it will default to NO
(so that the printed size depends on the DPI value). If this parameter is not
set and DPI is not specified, then UserUnit will be recorded (so that the
raster size in pixels recognized by GDAL on reading remain identical to the
source raster).

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list