- Why does my URL fail?
- Cross-Origin Resource Sharing (CORS). When your browser fetches a URL from JavaScript on a different domain, the target server has to explicitly allow it via response headers. Almost no public website does. This is a browser security feature, not something we can work around in-page. The reliable path: open the URL in a normal browser tab, view source (or right-click → View Page Source), copy the HTML, and paste it into the Paste HTML mode here. That bypasses CORS entirely because the HTML is now local. Pages that require login won't work either way — they need your session cookies, which our fetch can't borrow.
- Does it preserve CSS?
- Most of it, yes — but not all. html2canvas reads computed styles from the rendered DOM and paints them onto a canvas. Standard color, font, padding, border, background, and basic positioning all work. Inline styles, <style> tags inside your HTML, and styles applied via class names that reach your stylesheet all participate. The catch: if your HTML references external stylesheets on other domains, those may be blocked by CORS just like the URL fetch above — in that case the rendered output uses default styles for those rules. For best results, inline your CSS into a <style> block at the top of the HTML you paste.
- What about flexbox and grid?
- Flexbox: mostly works for the common cases (row/column layouts, basic alignment). Edge cases — flex-wrap with mixed-content children, baseline alignment, percentage gaps — sometimes render with the wrong dimensions. Grid: partial support. Simple grids with explicit row/column tracks usually work; auto-placement, subgrid, and named areas often don't. CSS custom properties (--my-var) are honored when read directly but break some layout calculations. If your document depends heavily on modern layout, use the browser's Print → Save as PDF (Chrome, Firefox, Safari all support it) instead — that uses the browser's real rendering engine, not a JS reimplementation.
- What about JavaScript?
- Not executed. We strip nothing, but html2canvas captures the DOM as it exists when we hand it over — and we don't run scripts in the off-screen render container. If your HTML relies on JS to inject content, run that JS in a regular browser tab first, view source on the rendered DOM (DevTools → Elements → Copy outerHTML on <html>), and paste the post-JS version here. Charts, single-page apps, anything that builds itself with JS — capture the rendered DOM, then convert.
- How does this compare to the browser's Print → Save as PDF?
- Print → Save as PDF uses your browser's real layout engine (Blink in Chrome, WebKit in Safari, Gecko in Firefox), so it nails everything — flexbox, grid, web fonts, JS-rendered content, perfect typography. The catch: it requires you to open the page in a tab first and walk through the print dialog. Our tool is for the case where you have raw HTML (an email template you're testing, an exported report, a snippet from a CMS) and want a PDF without opening it in a browser first. Use Print for fidelity, use this for speed and automation-friendly raw-HTML input.
- Is my HTML really not uploaded?
- Correct for Paste HTML and Upload .html — both run entirely in your browser, no outbound requests. For From URL there's exactly one outbound request: your browser fetches the URL you typed, and that's it; the fetched HTML stays in memory and never reaches our servers. Verify in your browser's network tab. The PDF gets built locally and downloaded via a blob URL.
- Why is the output bigger than I expected?
- Because the page gets rasterized into a canvas, then re-encoded as JPG when it lands in the PDF. A long page with lots of images can easily produce a multi-MB PDF even from a few KB of source HTML. If size matters, run the result through our PDF Compressor — for image-heavy output it'll often drop 50-70%.
- Can I convert a password-protected page or one behind a login?
- Not from URL mode — our fetch has no access to your browser cookies or auth headers. Workaround: open the page in your normal browser tab (where you're logged in), open DevTools → Elements, right-click the <html> tag → Copy → Copy outerHTML, then paste that into Paste HTML. That captures the fully rendered, authenticated page including any DOM that JS built after login.