Document Size to Pixels
Converts standard document sizes (A4, A3, 16:9, etc.) into pixel dimensions for use with Export Named Views.
Overview
Converts standard document sizes (A4, A3, 16:9, etc.) into pixel dimensions for use with Export Named Views.
Inputs (3)
- Format (Text): Paper format (e.g., A4, A3, 16:9 FHD).
- Landscape (Boolean): True for Landscape, False for Portrait. (Applies to A-series paper).
- DPI (Integer): Print DPI to use for the calculation (default 300).
Outputs (3)
- Width (Integer): Width in pixels.
- Height (Integer): Height in pixels.
- DPI (Integer): Pass-through DPI to wire into Export Views.
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- A-series formats (A0 to A5, ISO 216 sizes in mm) are oriented by Landscape and converted with pixels = round(mm / 25.4 × DPI).
- Screen formats (FHD 1920 × 1080, QHD 2560 × 1440, 4K 3840 × 2160, Instagram 1080 × 1080) keep their native pixel size (DPI does not apply) and are swapped to portrait when Landscape is False.
- Unknown formats fall back to A4 with a warning; DPI is passed through.
Assumptions
- Screen formats are exact pixel sizes; DPI only applies to paper formats and is passed through.
Simplifications and limits
- Only the listed formats are recognised; no custom sizes or US paper sizes.
Workflow
- Doc2Px Width, Height, DPI -> Export Named Views.
References
- ISO 216, paper sizes (A series).