Opened 3 years ago

Closed 3 years ago

#5412 closed defect (fixed)

Set correct PDF Userunit if pagesize is bigger that 14400 units

Reported by: Jukka Rahkonen Owned by: warmerdam
Priority: normal Milestone: 1.11.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: pdf


PDF standard sets a limits for the physical page size. For PDF 1.3 or earlier, the minimum page size is 72 x 72 units (1 x 1 in); the maximum is 3,240 x 3,240 units (45 x 45 in). Later versions have a minimum size of 3 x 3 units (approximately 0.04 x 0.04 in) and a maximum of 14,400 x 14,400 units (200 x 200 in). When it comes to unit size, in versions of PDF earlier than 1.6 (Acrobat 7.0), the size of the default user space unit was fixed at 1 ⁄ 72 inch, yielding a minimum of approximately 0.04 by 0.04 inch and a maximum of 200 by 200 inches. Beginning with PDF 1.6, the size of the unit may be set on a page-by-page basis; the default remains at 1/72 inch.

By now it seems that GDAL PDF driver may write bigger than 14400 x 14400 sized pages and still use the default unit size 1/72 inch. Such PDF files do not work at least with Adobe Acrobat Reader and they are probably invalid according to the PDF standard.

PDF driver should be modified to check if the extents of the PDF page that is to be created exceed 14400. If they do, driver should calculate a suitable PFD "Userunit"

See discussion and code examples from

Change History (1)

comment:1 Changed 3 years ago by Even Rouault

Component: defaultGDAL_Raster
Keywords: pdf added
Milestone: 1.11.0
Resolution: fixed
Status: newclosed

Fixed in r27026

Note: See TracTickets for help on using tickets.