<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Derek Roga]]></title><description><![CDATA[Web developer building free, focused web tools]]></description><link>https://derekroga.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 13:13:05 GMT</lastBuildDate><atom:link href="https://derekroga.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A4 vs US Letter: the geometry problem hiding in every print tool]]></title><description><![CDATA[Why A4 and US Letter break print layouts, and how to test margins, scaling and colour with the right test page.]]></description><link>https://derekroga.hashnode.dev/a4-vs-us-letter-the-geometry-problem-hiding-in-every-print-tool</link><guid isPermaLink="true">https://derekroga.hashnode.dev/a4-vs-us-letter-the-geometry-problem-hiding-in-every-print-tool</guid><category><![CDATA[Web Development]]></category><category><![CDATA[CSS]]></category><category><![CDATA[printing]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Productivity]]></category><dc:creator><![CDATA[Derek Roga]]></dc:creator><pubDate>Mon, 16 Nov 2026 23:09:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6afb882a0f274841bda322c2/2adabcef-da09-408a-8ea1-db6bca3ed3fd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I printed the same test page on two printers in the same week and got two different results. On one, the alignment grid sat neatly inside the margins. On the other, the right edge was cut off and the bottom row of marks was missing. Nothing about the file had changed. The paper had.</p>
<p>That is the quiet problem behind a lot of print frustration. We treat a page as a neutral rectangle, but A4 and US Letter are different rectangles, and a layout that is correct for one is wrong for the other in ways that are easy to miss until the ink is already on the paper.</p>
<h2>Two standards, two shapes</h2>
<p>A4 is 210 by 297 millimetres. Its aspect ratio is 1 to 1.414, the square root of two, which is why folding an A4 sheet in half gives you two A5 sheets with the same proportions. US Letter is 8.5 by 11 inches, or about 216 by 279 millimetres. Its aspect ratio is roughly 1 to 1.294.</p>
<p>The difference looks small on a spec sheet. In practice it changes everything about a layout:</p>
<ul>
<li>US Letter is about 6 millimetres wider than A4, but about 18 millimetres shorter.</li>
<li>A layout designed edge to edge for A4 will lose content at the bottom on Letter, or leave a blank band at the bottom when the same file is printed on A4.</li>
<li>A layout designed for Letter will run out of room on the right side of an A4 sheet, or sit with an uneven margin that looks like a mistake.</li>
</ul>
<p>Neither size is wrong. The mistake is assuming the page you designed on is the page your reader will print on.</p>
<h2>Where naive layouts break</h2>
<p>The first trap is margins. Most home and office printers cannot print to the very edge of the sheet. They need a border, often around 5 millimetres, and that border is not always the same on every side. If your design puts a border, a ruler or a crop mark within that unprintable area, part of it will simply not appear. The printout looks broken, but the file was fine. The printer did exactly what its hardware allows.</p>
<p>The second trap is scaling. Browser and system print dialogs offer options like Fit to page, Shrink to fit and Actual Size, and each one changes the result. Fit to page rescales the whole layout to the printable area, which sounds helpful until you realise it has changed the size of everything on the page. A 10 millimetre square is no longer 10 millimetres. If you are printing a test page to check alignment or to measure a margin, that silent rescaling makes the test useless. I print at 100 percent, or Actual Size, whenever I want to check the real geometry, and I only use Fit to page when I know the exact size does not matter.</p>
<p>The third trap is the CSS itself. A print stylesheet that hard-codes one page size will fail on the other. I set the page size explicitly, keep the printable content inside a safe area with real margins, and avoid fixed pixel widths that assume a particular sheet. A useful starting point looks like this:</p>
<pre><code class="language-css">@page {
  size: A4;
  margin: 10mm;
}

@media print {
  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
</code></pre>
<p>Change <code>size: A4</code> to <code>size: Letter</code> when you target US Letter, or better, offer both as separate pages or downloads. The point is to make the choice visible instead of letting the browser guess.</p>
<h2>How I handle both formats</h2>
<p>When I built my own test page tool, I made the paper size a first-class choice, not an afterthought. I built <a href="https://testprintpage.net/">Test Print Page</a> so I could switch between A4 and US Letter before printing, and so the preview I see on screen matches the sheet that comes out of the printer.</p>
<p>Two details matter most. First, the previews are vector based, so lines, grids and text stay sharp at any zoom level and do not turn into blurry pixels when they are scaled for print. A test page is only useful if the lines you are judging are actually straight and the spacing you are measuring is actually correct. Second, the pages are designed to print at 100 percent, or Actual Size, so a centimetre on the preview is a centimetre on the paper. That is the whole point of a test print: if the scale is wrong, every conclusion you draw from it is wrong too.</p>
<p>That approach also keeps the tool simple. There is no account to create and no file to install. You pick a sheet, check the preview, print it at actual size, and look at the result.</p>
<h2>From symptom to sheet</h2>
<p>A test page is a diagnostic tool, and the fastest way to use it is to start from what you can see. Here is the short mapping I use:</p>
<table>
<thead>
<tr>
<th>Symptom</th>
<th>What it usually points to</th>
<th>Sheet to start with</th>
</tr>
</thead>
<tbody><tr>
<td>Faded prints, or text that looks washed out</td>
<td>Low ink or toner, or a nozzle that needs cleaning</td>
<td>Quick test sheet</td>
</tr>
<tr>
<td>Streaks or bands across the page</td>
<td>A clogged nozzle, a dirty roller, or a damaged cartridge</td>
<td>Color test sheet</td>
</tr>
<tr>
<td>Wrong colours, or one colour missing</td>
<td>A colour channel that is empty or blocked</td>
<td>CMYK test sheet</td>
</tr>
<tr>
<td>Colours look fine but black text is weak</td>
<td>A black cartridge or black channel problem</td>
<td>Black and White test sheet</td>
</tr>
<tr>
<td>Content is shifted, cut off, or not centred</td>
<td>Wrong paper size, wrong margins, or scaling in the print dialog</td>
<td>Alignment test sheet</td>
</tr>
</tbody></table>
<p>Start with the sheet that matches the symptom, print it at actual size on the correct paper format, and compare it with the preview. If the alignment sheet is centred on A4 but shifted on Letter, you have a paper size problem, not a printer problem. If the colour sheet shows a missing channel on both sizes, you have an ink problem.</p>
<h2>A habit that saves paper</h2>
<p>Before I print anything I care about, I now check three things: the paper size selected in the print dialog matches the paper in the tray, the scale is set to 100 percent or Actual Size, and the margins leave room for the printer's unprintable area. Those three checks take a few seconds, and they have saved me more wasted paper than any other habit I have picked up while building print tools.</p>
<p>Paper is not a detail. It is the geometry your whole layout depends on. Get the sheet right first, and the rest of the print has a chance to be right too.</p>
]]></content:encoded></item></channel></rss>