Skip to content
RvanBPublic

About

A web utility for setting margins for book printing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

90 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Margins

A web utility for setting margins for book printing.

  • Upload PDFs or images of your content
  • Flip through page turner with thumbnail previews
  • Customize page size and text block dimensions
  • Adjust content region for each page
  • Apply van de Graaf overlay for a pleasing baseline
  • Display measurements for translation to real media
  • Save and load page dimensions and per-page settings to continue where you left off
  • Export at the source image resolution, with margins added
  • Export a page-order PDF or print-ready bookbinding signatures

New documents start with no added margins, centered content, bright white paper, and 35% show-through, matching the Riffle reader's appearance. Loading a PDF sets the book dimensions from its first page's physical size; all pages share that book size. Images use their first page's aspect ratio at the current book height. The van de Graaf button applies typographic margins when wanted, and loading a saved project restores its layout and display settings.

Export offers PNG page images, a single PDF in reading order, or folded signatures. Choose Folio (2 pages per side), Quarto (4), Octavo (8), or Sextodecimo (16). Printing both sides gives 4, 8, 16, or 32 pages per sheet, respectively. Each sheet folds into one signature, with page ordering and rotation handled automatically. PDFs contain the rendered page images, preserving the current margins, crop, effects, and optional page color; text is rasterized at the chosen source resolution or target DPI.

Exported PDFs encode physical page size in points (72 points per inch), independently of raster resolution: a 5 × 8.5-inch page is 360 × 612 points even at 600 DPI. PNG exports also record their physical pixel density so applications that honor PNG print-size metadata can retain the intended dimensions when converting to PDF. For reliable PDF page dimensions, use the direct PDF export. Older files with incorrect page-size metadata need their intended dimensions set in Margins first.

Signature export has its own print-paper size: Letter, Legal, Tabloid, A4, A3, or custom dimensions in inches. Presets use landscape for Folio/Octavo and portrait for Quarto/Sextodecimo; custom dimensions retain their entered orientation. Each page sits against its eventual spine fold, with equal trim allowance above and below. Actual size preserves the Margins page dimensions; Shrink to fit only reduces pages when necessary. Optional flyleaves add blank leaves at both ends. The final signature is padded with blank pages to fill one sheet.

Duplex output provides one PDF per signature, front then back. Single-sided output provides separate front and back PDFs for each sheet. Multiple files are saved to a chosen folder where supported, or downloaded as a ZIP, including layout-specific folding and printing instructions. Print at 100% / Actual size without additional booklet imposition; use short-edge duplex flipping on landscape paper and long-edge flipping on portrait paper. Fold each sheet following the included sequence, open closed folds as needed, and trim the outer edges to the finished size while keeping the spine intact.

Run the signature layout tests with node --test tests/*.test.mjs.

https://rvanbronkhorst.com/margin/

Margins screenshot

About

A web utility for setting margins for book printing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages