How does vector PDF cropping resize pages for E-Ink screens?
Rendering up to 8 sample thumbnails in tab memory locates actual ink pixels, while the export worker updates PDF page boundary boxes directly without converting text into bitmaps. Every glyph and diagram stays sharp vector artwork at any zoom level on Kindle, Kobo, and reMarkable readers.
Scanning 8 sample pages for ink bounds and gutters
Right after loading, the browser draws up to 8 sampled pages onto hidden canvases scaled to 220 px wide and reads RGBA pixels via the MDN CanvasRenderingContext2D.getImageData() API. Pixels convert to BT.601 luminance (0.299 R + 0.587 G + 0.114 B), treating transparent regions (alpha < 32) as paper white.
Border sampling picks the 80th-percentile brightness (180–255), subtracting 19 units (sensitivity = 0.75) so yellowed stock crops cleanly while clamping margins between 0 and 0.44 per side. The column detector checks 41%–59% width for an ink-free gutter (>= 1.5% canvas width).
When preparing documents for paper printing rather than portable displays, you need perimeter expansion instead of tighter borders. Switch workflows to add 3 mm or 0.125 in print bleed before exporting press-ready books.
Rewriting CropBox and MediaBox without rasterizing
Legacy k2pdfopt converters rasterize pages into gray PNGs, bloating file sizes and softening small subscripts. Here, @cantoo/pdf-lib keeps vector streams intact, handles /Rotate tags via displayMarginsToPage, and keeps cropped boxes at least 28 pt (~9.9 mm) wide.
Kindle, Kobo, and reMarkable screen presets explained
Each hardware button under E-reader preset tunes safe breathing padding and aspect relaxation rules to match real E-Ink display panels. Under the PDF Association ISO 32000-2 (PDF 2.0) standard, aligning CropBox and MediaBox to your screen’s width / height aspect ratio removes dead black letterbox bars when reading in portrait view.
| E-reader preset | Target screen size and resolution | Target aspect ratio | Default safe padding | Best workflow fit |
|---|---|---|---|---|
| Kindle Paperwhite (6.8”) | 300 ppi · 1236 × 1648 px |
0.750 (3:4) |
2.0 mm |
Trade paperbacks and split 2-column articles |
| Kindle (6”) | 300 ppi · 1072 × 1448 px |
0.740 |
1.5 mm |
Compact readers using half-view column splits |
| Kindle Scribe (10.2”) | 300 ppi · 1860 × 2480 px |
0.750 (3:4) |
4.0 mm |
Full-page technical PDFs, sheet music, annotations |
| Kobo Clara / Libra | 300 ppi · 1264 × 1680 px |
0.752 |
2.0 mm |
Textbooks, EPUB fallback manuals, wide PDFs |
| reMarkable 2 / Paper Pro | 226 ppi · 1404 × 1872 px |
0.750 (3:4) |
3.0 mm |
Handwritten PDF markup with clean margin space |
| Tight content crop | Maximum zoom on any screen | Unconstrained | 0.5 mm |
Dense tables, narrow journals, small phones |
When Trim white margins is active alongside Relax extra margins gently toward target e-reader aspect ratio, the optimizer expands excess outer whitespace within 0.96–1.04 of the preset aspect ratio instead of forcing an awkward crop. If your document started as plain Markdown notes and needs adjustable reader font sizes rather than fixed PDF zoom, compile a reflowable ebook directly with Markdown to EPUB.
Trim margins vs 2-column reflow vs half-view mode
Page density and display size determine which framing mode keeps dense academic print legible. Single-column monographs only need outer margin removal, whereas two-column IEEE or ACM papers require column splitting so 9-point body type stays sharp on compact E-Ink glass.
Splitting two-column academic papers cleanly
Selecting Split 2-column pages (left -> right) clones each page inside a worker thread built on the MDN Web Workers API documentation, writing left then right columns. Column gutter overlap (default 2.5 mm, capped at 14%) protects slanted italics along the split.
On compact 6-inch devices, Split 2-column half-views (6” screens) splits each column vertically into upper and lower views (4x pages per leaf). An 8% vertical overlap (minimum 8 pt, max 12%) keeps lines readable across page turns.
- Manual gutter tuning: Drag Column gutter split between
30%and70%while watching the dashed divider. - Two-up book scans: For physical facing pages scanned onto one landscape sheet, run a PDF two-up spread halving tool before cropping individual margins.
Preserving page 1 titles and RTL manga order
Because multi-page journal papers print wide titles and abstracts across leaf 1, Keep page 1 full width (title & abstract) trims leaf 1 whole while splitting pages 2 onward. Check Right column first (RTL / manga) whenever you crop PDF for Kindle reading in Japanese manga or Arabic periodicals.
Margin detection scope and scanned PDF troubleshooting
Picking the right Margin detection scope keeps page headers and edge punctuation safe across uneven scans. Review how pooling behaves across mixed spreads and when faint scans benefit from extra contrast adjustment.
Choosing Uniform, Odd / even, or Per page bounds
Uniform pools all valid page samples using a 10th-percentile safe minimum per edge so one wider diagram page protects narrower text pages from accidental clipping. Choose Odd / even for physical book scans where inner binding margins alternate between left and right sides on facing pages.
Selecting Per page applies each sampled page’s exact margins directly to that leaf. Unsampled intermediate pages interpolate automatically from the nearest same-parity sample (±0.25 parity bias).
Tip: Set Safe margin padding to
3 mmor4 mmif your PDF uses thin outer borders, page numbers in wide corners, or italic serif overhangs that touch the dashed black crop box in the Page 1 preview.
Boosting low-contrast scans and handling locked files
Because cropping keeps original content streams untouched, faint gray pencil scans or light xerox copies still appear dim on backlit-off E-Ink glass. Run a quick contrast pass first to avoid washed-out gray text on E-Ink screens before transferring long PDFs to your Kindle or Kobo.
If you only need specific chapters from a 400-page manual, use partial ranges instead of converting every appendix. Type intervals like 1-25, 40 under Page range (optional) and click Optimize PDF to test sizing quickly.