PDF of pages behind a login
HTML to PDF API for Pages Behind a Login
SitePDF renders a page that needs a login into a PDF by sending your session cookie or an Authorization header with the render call. The page prints in managed Chromium as your signed in user sees it, and the copy can be archived with a capture time.
- PDF and archive in one call
- Plans from $49 a month
- Your HTML stays yours
Short answer
To convert a page behind a login to PDF, send url together with cookies (an array of cookie objects) or headers (an object such as an Authorization bearer token) in the render call. SitePDF sets them before it opens the page, so the account dashboard, report or invoice view loads as it does for the signed in user.
Starter API is $49 a month for 10,000 renders ($288 billed yearly). Growth is $99 a month for 50,000 renders and Scale is $299 a month for 250,000. The address must be reachable from the public internet.
Written and fact checked by the SitePDF team.
Which way to authenticate the render
Pick the field that matches how your app checks the user. Both are passed to Chromium before the page loads.
| Your app uses | Send | Notes |
|---|---|---|
| A session cookie | cookies: an array of objects with name, value and domain |
Use a short lived session made for the render, not a staff login |
| A bearer token or API key header | headers: an object such as {"Authorization": "Bearer ..."} |
Sent with the page request and with the requests the page makes to the same site |
| A signed link with an expiry | url only |
No secret leaves your app and the link dies after a minute or two |
| A page on a private network or VPN | Not supported | The address must be public, so expose a signed route instead |
Plans and prices are from our own pricing page.
A worked example with a customer report
A SaaS product has a usage report at /reports/2026-11 that only the account owner can open. Support wants a PDF of it attached to the monthly email. The backend creates a session for that owner that expires in five minutes and passes it to the render.
{\n "url": "https://app.example.com/reports/2026-11",\n "format": "Letter",\n "wait_for": "#usage-chart",\n "cookies": [{"name": "session", "value": "abc123", "domain": "app.example.com"}],\n "archive": true\n}The chart is drawn by a script, so wait_for holds the render until it exists. With archive set to true the render is also stored with its capture time and a SHA-256 hash, as on the invoice PDF archive page.
Keep the credential small and short lived
Never hand the renderer a long lived staff password or a master key. Create a session or token that can read one account, set it to expire in minutes and revoke it when the render returns. A signed URL is even safer, because there is no secret to leak in the request body. The scheduled PDF reports article shows the signed route pattern.
Cookie and header values are used for that render. Treat the render request like any other call that carries a credential, and keep it out of your logs.
What it does not do
SitePDF does not type a username and password into a login form, solve a captcha or follow a two factor prompt. You supply a session that is already valid. It also cannot reach an address on a private network, because the render address must be public.
Single page apps that call an API with a token kept in browser storage need the token present before the first request. If your page reads it from localStorage, a cookie or header is not enough, and a signed render route in your own app is the cleaner fix.
Where it fits next to capture and archiving
Authenticated render is the same call used for public pages, so it works with batch lists and with the URL to PDF API. Teams that keep dated copies of what a customer saw in their account use it with website archiving. For invoices sent from a SaaS product see the HTML to PDF API for SaaS.
Who it is for and who it is not for
It is for developers who must produce a PDF of an account page, report or invoice view that only a signed in user can open, and want the same layout as the browser.
It is not for anyone who wants a tool to log in on its own, to capture third party sites whose terms forbid it, or to read pages on a private network.
curl -X POST https://api.sitepdf.com/v1/render \
-H "Authorization: Bearer $SITEPDF_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://app.example.com/reports/2026-11", "format": "Letter", "headers": {"Authorization": "Bearer $USER_TOKEN"}, "archive": true}'
This is the documented API call shape. Full request and response walkthrough.
Questions about this job
How do I convert a page behind a login to PDF?
Can I pass a bearer token to the HTML to PDF API?
Can the API log in with a username and password?
Can it render a page on an intranet or VPN?
How much does it cost?
Index
More PDF and archiving tools
- Convert HTML to PDF
- Webpage to PDF
- URL to PDF API
- Website archiving
- Monitor website changes
- Screenshot API
- React to PDF
- Java PDF library
- C# PDF library
- Python PDF generation
- HTML to PDF Node.js
- Laravel HTML to PDF
- Vue to PDF
- Next.js PDF generator
- Angular to PDF
- Markdown to PDF API
- Django HTML to PDF
- Blazor HTML to PDF
- Spring Boot HTML to PDF
- Airtable to PDF
- Svelte to PDF
- Rotativa alternative
- Zapier and Make HTML to PDF
- Golang HTML to PDF
- Rails HTML to PDF
- PDF generator API
- Website archiving software
- Document generation API
- Legal document automation software
- Document automation software
- Bulk HTML to PDF
- Accessible PDF generation
- ADA compliance audit cost
- 508 compliance testing
- PDF remediation
- VPAT and ACR
- PDF accessibility checker
- Wayback Machine alternative
- Best HTML to PDF API
- DocRaptor alternative
- Puppeteer alternative
- Wkhtmltopdf alternative
- PDFShift pricing and alternative
- Urlbox pricing and alternative
- PDFCrowd alternative
- Api2Pdf alternative
- Browserless alternative
- APITemplate alternative
- CraftMyPDF alternative
- PDFMonkey alternative
- dompdf alternative
- WeasyPrint alternative
- jsPDF alternative
- mPDF alternative
- Website archiving pricing comparison
- HTML to PDF API for ecommerce
- HTML to PDF API for SaaS
- HTML to PDF API for accounting software
- PHP convert HTML to PDF
- PrinceXML alternative
- PDFreactor alternative
- PDF integrity check
- Invoice PDF archive
- PDF page numbers, headers and footers
- Website archiving for law firms
- React PDF renderer alternative
- Gotenberg alternative
- GrabzIt alternative
- Adobe PDF Services API
- PDF SDK pricing
- HTML to image API pricing
- Adobe Document Generation API pricing
- jsreport pricing
- PDFBolt pricing
- PDFEndpoint pricing
- Formstack Documents pricing
- Documint pricing
- iLovePDF API pricing
- Browserless pricing
- PandaDoc API pricing
- CloudConvert API pricing
- Encodian pricing
- IronPDF pricing
- Salesforce document generation pricing
- Winnovative pricing
- SelectPdf, HiQPdf and EvoPdf pricing
- CloudConvert alternative
- Direct mail API pricing
- E-signature API pricing
- Sparticuz Chromium Lambda cost
- Browserbase pricing
- Aspose PDF pricing
- PDF API pricing
- How it works
- Features
- Pricing
Get started
Render and archive with one API call
A pixel perfect PDF and a dated copy of the page from the same request. Plans from $49 a month, half price billed yearly.