Standardize a mixed-size PDF on A4, Letter, A3, or Legal so it prints and files cleanly. The page canvas changes; the content stays vector.
How it works
Each page’s media box is set to the target dimensions with pdf-lib. Content is not scaled or re-encoded, so nothing blurs — but content positioned for a different aspect ratio may sit off-center. To trim margins instead, use crop PDF.
Good to know
- A4 is 595×842 pt; Letter is 612×792 pt
- Check the result before printing — content is not auto-scaled
- Mixed page sizes are detected by the PDF inspector