agentsclimarketplace

Web print pdf

Skill POWR-DATA/mtx-skills/skills/web/web-print-pdf

Reusable AI agent skills for application development, data, architecture, domain modelling and delivery workflows.

Install
npx -y skills add POWR-DATA/mtx-skills --skill web-print-pdf

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Produce reliable print and PDF output from an HTML page with print-specific CSS — pagination, image cropping, equal columns, running footers, and colour

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.0 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

Web Print PDF

Purpose

Turn an HTML page into clean, predictable print/PDF output using @media print CSS — controlling pagination, image cropping, column heights, running footers, and background colour so the printed result matches the design instead of the browser's default reflow.

When to use

When a web page must also produce a polished PDF or printout (invoices, reports, certificates, one/two-page summaries) via the browser's print engine (Ctrl+P → Save as PDF). Apply when print output crops wrongly, spills onto blank pages, drops background colours, or breaks awkwardly across pages. This covers the print-CSS layer, not server-side PDF generation.

Inputs expected

  • The HTML page (or component) to be printed
  • The target page count / layout (e.g. single page, fixed two-page)
  • Which elements must keep background colour or images in print
  • Any header/footer that should repeat on every printed page

Guiding principles

  • object-fit: cover is unreliable in Chrome's print engine — crop with a wrapper instead. In print, object-fit: cover on an <img> is often ignored and the full image renders at natural size. Wrap the image in a <div> with a fixed height and overflow: hidden, and let the container clip it — overflow clipping is handled by the layout engine and works consistently in print.
  • Match adjacent column heights with grid stretch, not pixel guessing. To make a photo column fill the height of the neighbouring text column, apply align-items: stretch to the grid container in @media print and height: 100% to the photo wrapper so it fills the stretched grid item. This removes all manual print-height tweaking.
  • A position: fixed element in @media print becomes a running footer on every page. position: fixed; bottom: 0; left: 0; right: 0 repeats at the bottom of every printed page (and prevents a footer overflowing onto a blank final page). Add padding-bottom to the main content equal to the footer height so content never prints underneath it.
  • Force page breaks explicitly, and protect elements from splitting. break-before: page (with the legacy page-break-before: always) on a section forces a clean break before it — the basis of reliable fixed-page layouts. Pair with break-inside: avoid (and page-break-inside: avoid) on cards/entries so they don't split across pages.
  • Background colours, gradients, and dot patterns are stripped in print unless forced. Browsers drop backgrounds in print mode by default. Add -webkit-print-color-adjust: exact; print-color-adjust: exact to any element whose background colour or image must appear in the PDF.
  • Always include both the modern and legacy break properties. Print CSS support is uneven across engines; write break-inside/break-before and their page-break-* equivalents together so the layout holds in Chrome, Firefox, and Safari print.

Process

  1. Add a dedicated @media print block — do not rely on screen CSS for print; screen layout reflows unpredictably on paper.
  2. Fix image cropping — replace object-fit cropping with fixed-height overflow: hidden wrappers.
  3. Equalise columns — set align-items: stretch on print grids and height: 100% on the elements that must fill.
  4. Set pagination — add break-before: page where pages must split and break-inside: avoid on atomic blocks.
  5. Add running header/footerposition: fixed in @media print, with matching padding on the content.
  6. Preserve colour — add print-color-adjust: exact to elements whose backgrounds must survive.
  7. Verify in the print dialog — Ctrl+P → Save as PDF, checking every page boundary, crop, and background.

Output format

  1. Print CSS block — the complete @media print rules
  2. Structural changes — any wrapper <div>s added for cropping or column stretch
  3. Pagination map — where breaks are forced and which blocks are kept intact
  4. Verification notes — confirmed page count, crops, footer repetition, and colour retention in the PDF

Quality checklist

  • All print styling lives in a dedicated @media print block
  • Image cropping uses fixed-height overflow: hidden wrappers, not object-fit
  • Equal-height columns use grid align-items: stretch + height: 100%
  • Forced breaks use both break-before: page and page-break-before: always
  • Atomic blocks use both break-inside: avoid and page-break-inside: avoid
  • Running footers use position: fixed with matching content padding-bottom
  • Colour-critical elements set -webkit-print-color-adjust: exact; print-color-adjust: exact
  • Output verified in Ctrl+P → Save as PDF, every page checked

Avoid

  • Relying on object-fit: cover for print image cropping — Chrome ignores it; use a clipping wrapper
  • Pixel-guessing column heights — use grid align-items: stretch instead
  • Using position: fixed for a footer without adding content padding-bottom — content prints underneath it
  • Writing only modern break-* (or only legacy page-break-*) properties — include both for cross-browser print
  • Expecting background colours to print by default — they are stripped without print-color-adjust: exact
  • Judging print output from the screen view — always verify in the actual print/PDF dialog

Example usage

"This HTML report needs to export as a clean two-page PDF via Ctrl+P. Right now the photo crops wrong, the coloured header prints white, the footer only shows on page one, and cards split across the page break. Give me the @media print CSS to fix it."


Source: This skill is sourced from the Matrix Skills library. Learn more at the AI Agent Skills Library.

What ships with it: 3 files

4.3 KB alongside SKILL.md

Gives 0 of the 12 instructions most pdf office docs skills give in ~1.4k tokens

Counted across 636 of the 690 authors here whose files we hold, read 2026-08-07

  • extract text using pdfplumberin 89 of 636, across 23 files
  • create PDFs using reportlabin 83 of 636, across 16 files
  • read forms.md to fill out pdf formsin 80 of 636, across 13 files
  • OCR scanned PDFs using pytesseractin 77 of 636, across 10 files
  • merge or split PDFs using qpdfin 70 of 636, across 3 files
  • use excel formulas instead of hardcoded calculated valuesin 68 of 636, across 13 files
  • unpack edit xml and repack existing documentsin 63 of 636, across 8 files
  • document sources for hardcoded valuesin 61 of 636, across 9 files
  • write minimal python code without unnecessary commentsin 59 of 636, across 7 files
  • run the recalculation script after adding or modifying formulasin 59 of 636, across 7 files
  • fix all identified formula errors and recalculatein 58 of 636, across 6 files
  • format years as text stringsin 57 of 636, across 5 files

Said here and by no other author read

  • Use a dedicated @media print block for print styles
  • Crop images using fixed-height overflow hidden wrappers
  • Equalize columns using grid stretch
  • Force page breaks with both modern and legacy properties
  • Protect elements from splitting with break-inside avoid
  • Add fixed positioned running footers with matching padding

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.