This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Universal Print Margin Adjuster

Productivity · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryProductivity
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script injects a print stylesheet overlay that lets you adjust page margins—top, bottom, left, right—before printing. It displays a floating panel with sliders for each margin (in inches or millimeters), a live preview of margin changes, and buttons to apply margins, reset to defaults, and print. The script applies custom margins when you trigger the print dialog, and stores per-domain margin preferences so your settings persist across visits. Additional options include removing headers/footers, enabling background colors, adjusting page scaling (50-150%), and exporting/importing margin settings as JSON for consistent printing across pages.

WHERE IT RUNS

Works on any webpage—articles, documentation, emails, or any content you want to print. The script injects print-specific CSS that overrides the page's default print styles, making it compatible with most websites.

HOW TO USE

The panel appears automatically when you visit a page. Use the sliders to adjust top, bottom, left, and right margins. Switch between inches (in) and millimeters (mm) using the unit buttons. Toggle "Show headers/footers" to include or exclude page headers and footers in the print output. Toggle "Show background colors" to preserve or remove background colors and images. Adjust the scaling slider to shrink or enlarge the page content (50-150%). Click "Apply Margins" to save your settings for the current domain. Click "Preview" to see a live preview of how the page will look with your current settings. Click "Print" to print with your custom margins. Export settings as JSON to use on other sites, or import previously exported settings. The panel automatically applies your saved margins when you revisit a domain.

TECHNICAL MECHANISM: PRINT STYLESHEET INJECTION WITH @PAGE MARGIN OVERRIDE

The script dynamically injects a style element into the document head with print-specific CSS rules. The @page rule sets margin-top, margin-bottom, margin-left, and margin-right using the user's selected values and unit (in or mm). The body margin is also set to match the @page margins for consistency across rendering engines. For scaling, the zoom property is applied to the body in the print media query. Background color printing uses -webkit-print-color-adjust and print-color-adjust with the value "exact" when enabled, or "economy" when disabled. Header/footer removal is achieved by targeting thead, tfoot, header, footer, and elements with .header/.footer classes with display: none. The preview feature clones the body content, removes scripts and interactive elements, applies the same margin and scaling styles to the clone, and displays it in a modal overlay. Margin values are stored per domain using GM_setValue with a JSON object containing all four margin values. The print button triggers window.print() after ensuring the stylesheet is applied, with a 300ms delay to allow the styles to render.

THE PANEL

The print margin adjuster appears in a draggable, resizable panel that remembers its position per site. The panel shows four margin sliders, unit toggle, option toggles, scaling slider, and action buttons. Drag by the header to reposition, collapse to a compact icon with a click, and resize using the bottom-right corner. The panel snaps to screen edges for tidy placement and closes with the Escape key. All settings—unit preference, header/background toggles, scaling value, and panel position—persist per website using GM_setValue, so your view returns exactly as you left it.

PLEASE NOTE

This script requires the free BotGentz extension to run. The script injects CSS rules that override the page's print styles—if the page has complex print stylesheets, some elements may not render as expected. The preview feature clones the page content, which may not work perfectly on pages with dynamic JavaScript or complex layouts. The scaling feature uses the CSS zoom property, which is supported in most browsers but may behave differently across rendering engines. Printing with custom margins may not work on all browsers or printer configurations. The script does not modify the page's on-screen appearance—only the print output and print preview. All settings are stored locally in your browser via GM_setValue and never transmitted.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.