Urgent.News

What's breaking now, across thousands of outlets.

Tech

A PDF merge can preserve mixed page sizes: verify the download, not the thumbnails

An A4 cover followed by a Letter report can be a correct merged PDF. A viewer may fit every page into the same window width, so a neat preview does not tell you whether the downloaded file kept each page's dimensions. For a merger whose contract is “append these pages in this order,” a useful test is to start with different page sizes and check that they remain different. Making them uniform is a…

A PDF merge can preserve mixed page sizes, but the downloaded preview does not guarantee that the final file will maintain each page's original dimensions. To verify this, a test was conducted using two documents: a one-page A4 cover and a two-page report with Letter and A4 pages. The downloaded file was checked against the expected order using pdfinfo, which revealed that the Letter page was correctly included.

The dimensions were confirmed for each page, ensuring they remained distinct. The test also verified that the order of the pages was maintained, as each page had distinctive markers. After merging, the file was further inspected by converting it to text and rendering it as images, confirming that the text and dimensions were accurate.

It's important to note that this test only covers a specific case and does not guarantee the same results for every possible PDF merge. A page-preserving merge should be defined separately from normalization, which can alter the content or page dimensions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Friday 23 October →