Convert PDF pages to a specific size
Unlike JPEG or PNG images, a PDF document isn't a fixed grid of pixels. It is a mathematical canvas where every line of text, shape, and image is drawn using geometric coordinates.
When you change the page size of a PDF, you aren't simply "stretching" an image—you are applying an Affine Transformation Matrix to the entire coordinate system.
To resize the content to fit a new page size (like converting A4 to US Legal), this tool first calculates a scaling factor based on the aspect ratio.
It then mathematically multiplies the coordinate of every single object in the page's Content Stream by this scaling factor using a 3x3 transformation matrix ([ sx 0 0 sy tx ty ]).
A PDF dictates its physical paper size using an array called the MediaBox (e.g., [0, 0, 612, 1008] for US Legal format).
If a document was previously cropped, it might also have a CropBox dictating the visible area. This tool resets the MediaBox to your chosen target dimensions and adjusts the internal object coordinates mathematically so everything fits perfectly inside it.
Mathematical scaling is powerful, but aspect ratios are strict limits.
If you attempt to convert a wide, panoramic landscape document into a tall portrait US Legal size, the tool will scale it until the width fits perfectly. This will inevitably leave empty white space at the top and bottom of the page (a phenomenon known as letterboxing).
When you resize a PDF page from A4 to US Letter, what happens to the vector graphics?