Skip to content

A5 paper size is (slightly) incorrect #1699

@bruceoberg

Description

@bruceoberg

it appears that the size of a5 paper defined in fpdf.PAGE_FORMATS is incorrect along it's narrow dimension. fpdf's A5 narrow dimension is 1.41 points longer than the ISO defintion.

converting millimeters to points is a simple multiplcation by two factors: mm to inch (1/25.4 aka 0.039370079) and inch to point (72). combining these factors gives us a mm to point conversion factor of 2.834645669.

ISO 216 defines A5 paper has having dimensions of 148mm x 210mm. when i convert these to points via the above conversion factor, i get 419.53pt x 595.28pt (rounded to hundredths).

in the source, the dictionary for fpdf.PAGE_FORMATS lists the size for a5 as (420.94, 595.28). the wide dimension matches the caclulations above. the narrow dimension, according to fpdf, is 1.41pt longer than these calculations.

fpdf's definition has been in place since the creation of this repository. it's likely that many clients depend on it, despite its incorrectness. 1.41 points is a small enough error that it may not affect anyone.

so i can't advocate that this be changed; i just wanted to document what i found when building my own table of ISO page sizes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions