Web page to PDF: print, screenshot or slices?
Three ways to get a PDF out of a page, tested on four pages. Pick who the file is for and read the answer first; the table and the reasons follow.
Keeps a page as it was shown, and needs to search it later.
Make this
One tall page, with a full-page picture next to it
format=pdf&pdf_fit_one_page=true, plus format=png&full_page=trueThe tall PDF kept 112 of 112 text blocks and 66 of 66 link targets in 60 KB, and it has no page breaks to argue about. It is text, so a search finds the clause. The picture is the proof of how the page looked, which a text PDF cannot be.
- text blocks kept, tall page
- 112 of 112
- link targets kept
- 66 of 66
- text page vs picture page
- 60 KB vs 1.4 MB
Turns an HTML invoice into a PDF that goes to a customer and into accounting.
Make this
The print stylesheet, paged A4
format=pdf&media_type=print&pdf_paper_format=a4&pdf_margin=15mmThe print PDF of the invoice is 28 KB on 3 pages with 65 of 65 text blocks as text. All 58 rows stayed whole and the table header came back on 3 of 3 pages. The screen version of the same page was 7.2× bigger.
- print PDF, 3 pages
- 28 KB
- text blocks as text
- 65 of 65
- in a picture PDF
- 0 of 65
Hands a client a record of what a page said and linked to.
Make this
One tall page, screen look
format=pdf&pdf_fit_one_page=trueOnly the screen look kept every link: 66 of 66 targets on the terms page, against 27 for the print stylesheet, which hides the menu, the footer links and the contents list. The text stayed searchable (112 of 112 blocks).
- link targets, screen look
- 66 of 66
- link targets, print stylesheet
- 27 of 66
- headings tagged in any file
- 0
Shows a client how a page looks, at its real width, with every effect.
Make this
A full-page picture on one PDF page
format=png&full_page=true (add device_scale_factor=2 for a sharper file), then put it on a pageThe picture PDF of the landing page is the page pixel for pixel: the gradient, the blurred glass card and the shadows are in it, at three columns. It costs 2.0 MB, against 522 KB for the tall vector page.
- card columns, A4 vs tall page
- 1 → 3
- pixels that differ, pinned tall page
- 2.5%
- picture on A4 at full width
- 155 ppi
Five files from one page
The question has three answers: print the page, put one screenshot on a PDF page, or put a screenshot on every page. The first three are made by printing the page: with its print rules, with its screen look, or as one long sheet. The last two are pictures. Those need a PDF library on your side, because a request for a PDF returns a printed page, not a picture.
- 1One request
Print stylesheet, paged
The page drawn with its @media print rules, cut into A4 pages. Text stays text.
format=pdf&media_type=print&pdf_margin=15mm - 2One request
Screen look, paged
The page as it looks in a browser, cut into A4 pages. This is what a PDF request returns without any extra option.
format=pdf&pdf_margin=15mm - 3One request
One tall page
The screen look on a single page as tall as the content. Text stays text.
format=pdf&pdf_fit_one_page=true - 4Needs your code
Screenshot in a PDF
A full-page screenshot placed on one PDF page the size of the picture. Everything is pixels.
format=png&full_page=true, then put the file on a page with a PDF library - 5Needs your code
One image per page
The same screenshot cut into A4-shaped slices, one slice on each PDF page.
format=png&full_page=true, cut every 1,811 px, one slice per page
A sixth file, made later, is the tall page with one rule added to the page. It appears only for the landing page, where it is needed.
The result in one table
Choose a test page. Green is what you want from a PDF, amber is partly, red is the thing that goes wrong. Text and links are counted in the file, not guessed from the picture: every PDF was read back with pdf.js, and the page was counted from the browser.
36 clauses of text, a sticky top bar and contents list, a cookie bar fixed to the bottom, 66 distinct link targets, a print stylesheet that hides all three.
| Measure | Print stylesheet, pagedone request | Screen look, pagedone request | One tall pageone request | Screenshot in a PDFneeds your code | One image per pageneeds your code |
|---|---|---|---|---|---|
| File size | 84 KB | 129 KB | 60 KB | 1.4 MB | 1.4 MB |
| Pages | 11 × A4 | 18 × A4 | 1 × 1,280 × 10,405 px | 1 × 1,280 × 10,405 px | 6 × 1,280 × 1,811 px |
| Text you can select | partly: 110 of 112 | good: 112 of 112 | good: 112 of 112 | poor: 0 of 112 | poor: 0 of 112 |
| Links that still work | poor: 27 of 66 | good: 66 of 66 | good: 66 of 66 | poor: 0 of 66 | poor: 0 of 66 |
| Page breaks | good: 11 pages; text flows from one to the next | partly: 18 pages; the fixed bar is on 18 of 18 | good: None: one page | good: None: one page | poor: Cuts through text at 3 of 5 page edges |
| Looks like the screen | partly: No: the print rules hide the bars and the contents list | good: Same look, laid out 681 px wide | good: Same look, 1,280 px wide | good: Identical: it is the picture | partly: Identical, in pieces |
58 table rows with coloured header and striped rows, a totals box, a pay button, a print stylesheet that keeps rows whole and drops the button.
| Measure | Print stylesheet, pagedone request | Screen look, pagedone request | One tall pageone request | Screenshot in a PDFneeds your code | One image per pageneeds your code |
|---|---|---|---|---|---|
| File size | 28 KB | 200 KB | 206 KB | 202 KB | 203 KB |
| Pages | 3 × A4 | 3 × A4 | 1 × 1,280 × 2,724 px | 1 × 1,280 × 2,724 px | 2 × 1,280 × 1,811 px |
| Text you can select | good: 65 of 65 | good: 65 of 65 | good: 65 of 65 | poor: 0 of 65 | poor: 0 of 65 |
| Links that still work | poor: 1 of 2 | good: 2 of 2 | good: 2 of 2 | poor: 0 of 2 | poor: 0 of 2 |
| Page breaks | good: 3 pages; text flows from one to the next | good: 3 pages; text flows from one to the next | good: None: one page | good: None: one page | poor: Cuts through text at 1 of 1 page edges |
| Looks like the screen | partly: No: the print rules drop the shadow and the pay button | good: Same look, laid out 681 px wide | good: Same look, 1,280 px wide | good: Identical: it is the picture | partly: Identical, in pieces |
A 100vh gradient hero with a blurred glass card, a fixed header and a fixed corner bar, nine cards in a three-column grid with shadows, a chart, a lazy picture.
| Measure | Print stylesheet, pagedone request | Screen look, pagedone request | One tall pageone request | One tall page, hero pinnedone request | Screenshot in a PDFneeds your code | One image per pageneeds your code |
|---|---|---|---|---|---|---|
| File size | 289 KB | 626 KB | 72 KB | 522 KB | 2.0 MB | 2.0 MB |
| Pages | 6 × A4 | 6 × A4 | 1 × 1,280 × 4,560 px | 1 × 1,280 × 4,560 px | 1 × 1,280 × 4,560 px | 3 × 1,280 × 1,811 px |
| Text you can select | partly: 18 of 19 | good: 19 of 19 | poor: 3 of 19 | good: 19 of 19 | poor: 0 of 19 | poor: 0 of 19 |
| Links that still work | poor: 14 of 19 | good: 19 of 19 | poor: 6 of 19 | good: 19 of 19 | poor: 0 of 19 | poor: 0 of 19 |
| Page breaks | good: 6 pages; text flows from one to the next | partly: 6 pages; the fixed bar is on 6 of 6 | good: None: one page | good: None: one page | good: None: one page | poor: Cuts through text at 2 of 2 page edges |
| Looks like the screen | partly: No: the print rules drop the hero colours and the blur | partly: No: one column instead of three at 681 px, the hero is one page tall | poor: No: only the hero, which grew to the page height | good: Same look: 3 columns, 2.5% of pixels differ | good: Identical: it is the picture | partly: Identical, in pieces |
The terms page with 70 clauses, 20,087 px tall: longer than one PDF page can be.
| Measure | Print stylesheet, pagedone request | Screen look, pagedone request | One tall pageone request | Screenshot in a PDFneeds your code | One image per pageneeds your code |
|---|---|---|---|---|---|
| File size | 138 KB | 297 KB | 73 KB | 2.8 MB | 2.8 MB |
| Pages | 21 × A4 | 34 × A4 | 1 × 1,280 × 14,400 px | 1 × 1,280 × 20,088 px | 12 × 1,280 × 1,811 px |
| Text you can select | partly: 212 of 214 | good: 214 of 214 | poor: 154 of 214 | poor: 0 of 214 | poor: 0 of 214 |
| Links that still work | poor: 49 of 122 | poor: 88 of 122 | poor: 106 of 122 | poor: 0 of 122 | poor: 0 of 122 |
| Page breaks | good: 21 pages; text flows from one to the next | partly: 34 pages; the fixed bar is on 34 of 34 | poor: One page, cut off at 14,400 px | good: None: one page | poor: Cuts through text at 4 of 11 page edges |
| Looks like the screen | partly: No: the print rules hide the bars and the contents list | good: Same look, laid out 681 px wide | partly: Same look for the first 14,400 px | good: Identical: it is the picture | partly: Identical, in pieces |
Read it by row. The text row splits the table in two: the printed and tall files hold their text, the two picture files hold none, on every page. The links row shows what the print stylesheet costs: the terms page lost 39 of its 66 link targets because the stylesheet hides the menu and the contents list. The size row has one exception: the invoice picture was no bigger than its vector page (202 KB against 206 KB), a page of flat colour and thin text.
Print is a choice, not the default
A request for a PDF to CurlShot draws the page with the screen media type, so the PDF has the menu, the sidebar and the cookie bar. The print look is one option away: media_type=print. The PDF docs say the same.
The cookie bar is the odd one. It is fixed to the window, and a paged PDF draws a fixed element on every page: the screen PDF of the terms page had it on 18 of 18 pages, and the 70-clause page on 34 of 34. In the one-page file it appeared once, because there is only one page.
On the invoice, the print file kept the table header on 3 of 3 pages and the screen file on 1 of 3. All 58 rows stayed whole in both. The cause of the difference was not looked for.
Terms page, same request, two media types
- media_type=print
11 pagesA4, 15 mm margins
27 of 66link targets
nonewith the cookie bar
- Default: screen
18 pagesA4, 15 mm margins
66 of 66link targets
18 pageswith the cookie bar
One tall page has two limits
A hero of 100vh. The one-page PDF of the landing page held 3 of 19 text blocks: the hero, and nothing under it. In paged media a viewport unit is measured against the page area,[2] and here the page is as tall as the whole document, so min-height: 100vh made the hero as tall as everything. The rest went onto a second page, which the one-page call does not keep. With this rule added through the styles option, the same page held 19 of 19:
styles=.hero { min-height: 800px }Your hero has its own class name, so the rule is yours to write. The customize page describes styles and hide_selectors. A page without a viewport-height element, like the terms page and the invoice, needed nothing.
A page over 14,400 px. A PDF page is at most 150 inches, which is 14,400 px at 96 per inch. The 20,087 px page came out 14,400 px tall and was cut there: 154 of its 214 text blocks and 106 of its 122 link targets made it. The PDF docs give the same limit and say to leave pdf_fit_one_page off for such pages. The paged screen PDF kept all 214 blocks, on 34 pages.
What a picture costs
A screenshot on a PDF page is the one output that cannot disagree with the screen. It pays three ways, and the first is the one you notice only when you zoom.


File size, text PDF against picture PDF
Terms of service (10,404 px)
Tall PDF60 KBPicture PDF1.4 MB · 24×Invoice (2,723 px)
Tall PDF206 KBPicture PDF202 KB · 1.0×Landing page (4,558 px)
Tall PDF, hero pinned522 KBPicture PDF2.0 MB · 3.9×Long terms page (20,087 px)
Tall PDF73 KBPicture PDF2.8 MB · 38×
Sharpness. The picture is 1,280 px across. Spread over the 8.27 in width of an A4 sheet that is about 155 pixels per inch. Asking for device_scale_factor=2 doubles it: the landing page picture grew from 1.8 MB to 5.9 MB as a PNG, and the 10,404 px terms page was not made at 2x in this run (it would be 20,808 px tall).
Slices. One image per page puts an edge every 1,811 px, whatever is there. Over the four pages that edge ran through a line of text at 10 of 19 places; on the invoice it was a table row. A printed page can move a row to the next page, and a slice cannot.
Nothing to search. Both picture files held 0 of 112 text blocks and no links on the terms page. The terms page text PDF is 24× smaller and can be searched.
A4 is a narrow window
A paged PDF lays the page out as wide as the paper minus the margins: 681 px on A4 with 15 mm margins. That is under the 800 px at which the landing page switches to one column, so both paged files drew its nine cards in a single column, and in the screen file the 100vh hero filled the first page. The tall file and the picture are laid out at 1,280 px.
With the hero pinned, the tall page matched the screenshot closely: 2.5% of its pixels differed by more than 48 of 255, with the gradient, the blur and the shadows present. Both files were drawn by pdf.js, so part of that is the viewer.
Landing page, cards per row
- Paged A4 (screen or print)1 column, 681 px wide
- Tall page, hero pinned3 columns, 1,280 px wide
The recommendations, in full
Each reader gets a first choice, a fallback and a thing to leave out. The options are the ones used in the test; a page with other CSS can move any of the numbers.
Lawyer or archivist
Keeps a page as it was shown, and needs to search it later.
- Make this
- One tall page, with a full-page picture next to it
format=pdf&pdf_fit_one_page=true, plus format=png&full_page=true- Because
- The tall PDF kept 112 of 112 text blocks and 66 of 66 link targets in 60 KB, and it has no page breaks to argue about. It is text, so a search finds the clause. The picture is the proof of how the page looked, which a text PDF cannot be.
- Second choice
- Over 14,400 px the tall page is cut off (the 20,087 px page kept 154 of 214 blocks). Use the paged screen PDF then, and hide fixed bars first.
- Leave out
- A picture-only PDF as the single copy: 1.4 MB for the same page and no text at all. The print stylesheet: it kept 27 of 66 link targets and left out the contents list.
Invoice developer
Turns an HTML invoice into a PDF that goes to a customer and into accounting.
- Make this
- The print stylesheet, paged A4
format=pdf&media_type=print&pdf_paper_format=a4&pdf_margin=15mm- Because
- The print PDF of the invoice is 28 KB on 3 pages with 65 of 65 text blocks as text. All 58 rows stayed whole and the table header came back on 3 of 3 pages. The screen version of the same page was 7.2× bigger.
- Second choice
- The paged screen PDF when the invoice has no print stylesheet and you do not want to write one. It kept the pay button as a link (2 targets) and the header on 1 of 3 pages.
- Leave out
- Picture PDFs: 0 of 65 text blocks, so no amount can be read or copied, and the slices cut through a table row at 1 of 1 page edge.
SEO auditor
Hands a client a record of what a page said and linked to.
- Make this
- One tall page, screen look
format=pdf&pdf_fit_one_page=true- Because
- Only the screen look kept every link: 66 of 66 targets on the terms page, against 27 for the print stylesheet, which hides the menu, the footer links and the contents list. The text stayed searchable (112 of 112 blocks).
- Second choice
- The paged screen PDF for pages over 14,400 px. It kept 88 of 122 targets on the 20,087 px page.
- Leave out
- Picture PDFs, which hold no text and no links to check. And do not expect headings: none of these files has a structure tree or an outline, so a heading is only large text.
Designer
Shows a client how a page looks, at its real width, with every effect.
- Make this
- A full-page picture on one PDF page
format=png&full_page=true (add device_scale_factor=2 for a sharper file), then put it on a page- Because
- The picture PDF of the landing page is the page pixel for pixel: the gradient, the blurred glass card and the shadows are in it, at three columns. It costs 2.0 MB, against 522 KB for the tall vector page.
- Second choice
- The tall PDF with the hero pinned, if the client should zoom in or copy text: 2.5% of its pixels differ from the screenshot, and it needs the hero fixed first, because a 100vh hero takes the whole page.
- Leave out
- Paged A4 files: the page is laid out 681 px wide, so the landing page turned into 1 column instead of 3 and the hero filled a page.
One honest gap
How it was run
On 12 November 2026. Four test pages were served from a local server: a terms-of-service page (36 clauses, 10,404 px tall), an invoice (58 rows, 2,723 px), a landing page (gradient hero of 100vh, blur, shadows, grid, a fixed bar, 4,558 px) and the terms again with 70 clauses (20,087 px). Each has a screen layout and a print stylesheet. For every page and every method a new Chromium 153.0.8010.12 context opened it through Playwright 1.63.0 in a 1280 x 800 window and scrolled through it in 350 px steps, as the renderer does before a full-page capture. The paged PDFs are A4 with 15 mm margins. Each PDF was then read back with pdf.js 6.5.438: pages, text, link annotations and structure.
The call that makes each PDF takes the arguments the CurlShot renderer passes to page.pdf, read from its source file on the day: the page size from the content for the tall file, A4 for the paged ones, backgrounds on, a 15 mm margin. No request went to the API, so the numbers describe Chromium and those calls, not the service. The two picture files were made by Chromium too: a Playwright full-page screenshot placed on a page, whole or in slices. Text was counted by matching the first 24 characters of each block of the screen text in the PDF; links are the distinct addresses and in-page destinations in the link annotations.
The pages are synthetic and small, built to trip one thing each. Your page has other CSS, so check the three or four things you care about on it: try the website to PDF tool without an account, or the URL to PDF API when you want it in code. A PDF render counts as one screenshot of your plan, whatever its length; see pricing for the free plan.
Related reading
Questions people ask
Should I print a web page to PDF or screenshot it?
Print it, unless the look is the whole point. In a run on 12 November 2026, the PDFs made by printing kept their text selectable and their links clickable, at 60 KB to 129 KB for a 10,404 px page. A screenshot on a PDF page was 1.4 MB and held no text and no links.
Why does my PDF contain the menu and the cookie banner?
CurlShot draws a PDF with the screen media type unless media_type=print is set, so the page keeps its menus. A bar fixed to the window is drawn again on every page of a paged PDF: in the test it was on 18 of 18 pages. Use media_type=print if the site has a print stylesheet, or hide the bar with hide_selectors.
Why does a one-page PDF show only the top of my page?
A hero with min-height: 100vh is measured against the PDF page, which is as tall as the content, so the hero fills it and the rest moves to a second page that the one-page call drops. In the test the landing page kept 3 of 19 text blocks; fixing the hero to 800 px with the styles option kept 19. A page over 14,400 px is also cut off.
Is a screenshot inside a PDF searchable?
No. In the test the picture PDFs held 0 text blocks and no links on every page, because the PDF contains pixels. A search tool would need OCR, and the file was 24× larger than the tall text PDF of the same page.
Which PDF should an invoice use?
The paged print PDF at A4. The test invoice came to 28 KB on 3 pages, with every row whole and the table header on every page. The screen version was 7.2× bigger. No file in the test was tagged; PDF/A was not tested.
Sources
- [1]Playwright documentation, Page.pdf: options tagged, outline, pageRanges and margins. Checked .
- [2]W3C, CSS Values and Units Module Level 4, 6.1.2 Viewport-percentage lengths. Checked .
Read next
- ReferenceWeb page to PDF: paper sizes, margins, print CSSPaper sizes in millimetres, inches, CSS pixels and points, how margins and page breaks work in a PDF of a web page, and the print CSS that controls them.
- ChecklistCapture a web page as evidence that holds upA checklist for saving a web page as a credible record: what to capture, how to fix the time with a hash and timestamp, and what makes a screenshot weak.
- ComparisonPNG, JPEG, WebP or PDF for website screenshotsA decision flow, a comparison table and our own file-size measurements for choosing PNG, JPEG, WebP or PDF when you save a screenshot of a web page.