[{"data":1,"prerenderedAt":435},["ShallowReactive",2],{"blog-en-save-web-page-as-pdf":3},{"id":4,"title":5,"alternate":6,"author":7,"body":8,"category":419,"date":420,"description":421,"extension":422,"image":423,"meta":424,"navigation":320,"path":425,"seo":426,"stem":427,"tags":428,"tool":433,"__hash__":434},"blog_en/blog/save-web-page-as-pdf.md","How to Save a Web Page as a PDF (and Make It Look Good)","guardar-pagina-web-como-pdf","DocMorpher",{"type":9,"value":10,"toc":413},"minimark",[11,22,26,29,34,37,102,105,116,120,123,141,148,166,170,173,349,372,376,409],[12,13,15,16],"div",{"style":14},"text-align: center; margin: 20px 0 35px;","\n  ",[17,18,21],"a",{"href":19,"style":20},"/html-to-pdf","display: inline-block; padding: 10px 20px; background-color: #2575fc; color: white; text-decoration: none; border-radius: 5px; font-size: 16px; font-weight: 500;","Convert HTML to PDF for free",[23,24,25],"p",{},"Saving a web page as a PDF is handy for keeping a purchase receipt, a recipe, an article to read offline, or proof of what a page said on a given date. The trouble is the result often has broken menus, cookie banners and half the content cut off.",[23,27,28],{},"Here are three ways to do it, depending on what you need.",[30,31,33],"h2",{"id":32},"option-1-from-your-browser-fastest","Option 1: from your browser (fastest)",[23,35,36],{},"Every browser can \"print\" to PDF:",[38,39,40,53,65,96],"ol",{},[41,42,43,44,48,49,52],"li",{},"Open the page and press ",[45,46,47],"code",{},"Ctrl + P"," (",[45,50,51],{},"Cmd + P"," on Mac).",[41,54,55,56,60,61,64],{},"Under ",[57,58,59],"strong",{},"Destination",", choose ",[57,62,63],{},"Save as PDF",".",[41,66,67,68,71,72],{},"In ",[57,69,70],{},"More settings",":\n",[73,74,75,82,89],"ul",{},[41,76,77,78,81],{},"Turn on ",[57,79,80],{},"Background graphics"," to keep colors and backgrounds.",[41,83,84,85,88],{},"Turn off ",[57,86,87],{},"Headers and footers"," to remove the URL and date from the margins.",[41,90,91,92,95],{},"Adjust ",[57,93,94],{},"Scale"," if content spills off the right edge.",[41,97,98,99,64],{},"Click ",[57,100,101],{},"Save",[23,103,104],{},"Perfect for receipts and articles. The weak spot: many sites have poor print styles or hide content when printing.",[23,106,107,110,111,115],{},[57,108,109],{},"Tip:"," if your browser has ",[112,113,114],"em",{},"Reader mode"," (Firefox, Safari, Edge), switch it on before printing. It strips menus and ads and leaves just the text and images.",[30,117,119],{"id":118},"option-2-convert-an-html-file-to-pdf","Option 2: convert an HTML file to PDF",[23,121,122],{},"If you're a developer or designer, or you generate reports and invoices as HTML, converting the file directly is the easiest route:",[38,124,125,132,138],{},[41,126,127,128,131],{},"Save the page as ",[45,129,130],{},".html"," (with styles embedded, if possible).",[41,133,134,135,64],{},"Upload it to the ",[17,136,137],{"href":19},"HTML to PDF converter",[41,139,140],{},"Download the PDF.",[23,142,143,144,147],{},"The converter handles CSS: inline styles, ",[45,145,146],{},"\u003Cstyle>"," tags and external stylesheets. Two things to keep in mind:",[73,149,150,160],{},[41,151,152,155,156,159],{},[57,153,154],{},"JavaScript isn't executed."," If content is generated by JS (charts, tables loaded later), first save the final HTML from your browser (",[112,157,158],{},"Save As > Webpage, Complete",") and convert that file.",[41,161,162,165],{},[57,163,164],{},"One page at a time."," For a whole site, convert each page separately.",[30,167,169],{"id":168},"option-3-make-the-pdf-look-great-if-you-own-the-site","Option 3: make the PDF look great (if you own the site)",[23,171,172],{},"If you control the HTML, a few print CSS rules make a big difference:",[174,175,180],"pre",{"className":176,"code":177,"language":178,"meta":179,"style":179},"language-css shiki shiki-themes github-light github-dark","@media print {\n  nav, footer, .cookie-banner, .ads { display: none; }\n  body { font-size: 12pt; }\n  table, img, figure { break-inside: avoid; }\n  h2, h3 { break-after: avoid; }\n}\n\n@page { size: A4; margin: 2cm; }\n","css","",[45,181,182,199,238,259,287,309,315,322],{"__ignoreMap":179},[183,184,187,191,195],"span",{"class":185,"line":186},"line",1,[183,188,190],{"class":189},"szBVR","@media",[183,192,194],{"class":193},"sj4cs"," print",[183,196,198],{"class":197},"sVt8B"," {\n",[183,200,202,206,209,212,214,218,220,223,226,229,232,235],{"class":185,"line":201},2,[183,203,205],{"class":204},"s9eBZ","  nav",[183,207,208],{"class":197},", ",[183,210,211],{"class":204},"footer",[183,213,208],{"class":197},[183,215,217],{"class":216},"sScJk",".cookie-banner",[183,219,208],{"class":197},[183,221,222],{"class":216},".ads",[183,224,225],{"class":197}," { ",[183,227,228],{"class":193},"display",[183,230,231],{"class":197},": ",[183,233,234],{"class":193},"none",[183,236,237],{"class":197},"; }\n",[183,239,241,244,246,249,251,254,257],{"class":185,"line":240},3,[183,242,243],{"class":204},"  body",[183,245,225],{"class":197},[183,247,248],{"class":193},"font-size",[183,250,231],{"class":197},[183,252,253],{"class":193},"12",[183,255,256],{"class":189},"pt",[183,258,237],{"class":197},[183,260,262,265,267,270,272,275,277,280,282,285],{"class":185,"line":261},4,[183,263,264],{"class":204},"  table",[183,266,208],{"class":197},[183,268,269],{"class":204},"img",[183,271,208],{"class":197},[183,273,274],{"class":204},"figure",[183,276,225],{"class":197},[183,278,279],{"class":193},"break-inside",[183,281,231],{"class":197},[183,283,284],{"class":193},"avoid",[183,286,237],{"class":197},[183,288,290,293,295,298,300,303,305,307],{"class":185,"line":289},5,[183,291,292],{"class":204},"  h2",[183,294,208],{"class":197},[183,296,297],{"class":204},"h3",[183,299,225],{"class":197},[183,301,302],{"class":193},"break-after",[183,304,231],{"class":197},[183,306,284],{"class":193},[183,308,237],{"class":197},[183,310,312],{"class":185,"line":311},6,[183,313,314],{"class":197},"}\n",[183,316,318],{"class":185,"line":317},7,[183,319,321],{"emptyLinePlaceholder":320},true,"\n",[183,323,325,328,330,333,336,339,341,344,347],{"class":185,"line":324},8,[183,326,327],{"class":189},"@page",[183,329,225],{"class":197},[183,331,332],{"class":193},"size",[183,334,335],{"class":197},": A4; ",[183,337,338],{"class":193},"margin",[183,340,231],{"class":197},[183,342,343],{"class":193},"2",[183,345,346],{"class":189},"cm",[183,348,237],{"class":197},[73,350,351,357,363],{},[41,352,353,356],{},[45,354,355],{},"display: none"," hides menus, footers and notices that add nothing on paper.",[41,358,359,362],{},[45,360,361],{},"break-inside: avoid"," keeps tables and images from splitting across pages.",[41,364,365,367,368,371],{},[45,366,327],{}," sets paper size and margins (use ",[45,369,370],{},"size: letter"," in the US).",[30,373,375],{"id":374},"common-problems-and-fixes","Common problems and fixes",[73,377,378,391,397,403],{},[41,379,380,383,384,386,387,390],{},[57,381,382],{},"White background, no colors:"," enable ",[112,385,80],{}," or add ",[45,388,389],{},"print-color-adjust: exact;"," to your CSS.",[41,392,393,396],{},[57,394,395],{},"Content cut off on the right:"," lower the scale to 80–90% or switch to landscape.",[41,398,399,402],{},[57,400,401],{},"Cookie notice on every page:"," accept or close it before printing.",[41,404,405,408],{},[57,406,407],{},"Missing images:"," some sites load them as you scroll. Scroll to the bottom of the page before converting.",[410,411,412],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":179,"searchDepth":201,"depth":201,"links":414},[415,416,417,418],{"id":32,"depth":201,"text":33},{"id":118,"depth":201,"text":119},{"id":168,"depth":201,"text":169},{"id":374,"depth":201,"text":375},"Guides","2026-10-26","Three ways to turn a website or HTML file into a PDF, and how to avoid cut-off menus, blank backgrounds and ads in the document.","md","/images/blog/default_blog.jpg",{},"/blog/save-web-page-as-pdf",{"title":5,"description":421},"blog/save-web-page-as-pdf",[429,430,431,432],"html","pdf","web","browser","html-to-pdf","p52X8ytXEXKebOlBOWOxFTLG1EsVIYc7owLC04vhWik",1793060133979]