Content is scaled to fit, never cropped
Each page is scaled by a single factor chosen so the whole page fits inside the new size, then centred on it.
Because width and height are scaled by the same factor, nothing is stretched or squashed. Because the factor is the smaller of the two that would fit, nothing runs off the edge and nothing is cut away. When the old and new shapes differ, the leftover space appears as even margins on two sides — converting a squarer page to a taller one leaves bands at the top and bottom. That is the honest result of fitting one rectangle inside another.