iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use Puppeteer’s page.screenshot() after the invoice has rendered. Set the viewport before loading the page, wait for the invoice’s actual ready state, then save the capture as an image. Use page.pdf() instead when you need a print-oriented document. A screenshot records what the browser displayed; it does not confirm that the invoice complies with GST rules.
Take an invoice screenshot with Puppeteer
This runnable Node.js example opens an invoice URL, sets a viewport, waits for navigation to settle, and saves a full-page PNG:
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 900 });
await page.goto('https://example.com/invoice/123', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'gst-invoice.png', fullPage: true });
} finally {
await browser.close();
}
Replace the example URL with the invoice page you are authorized to access. Install Puppeteer in your project with npm install puppeteer if it is not already present. The example uses ECMAScript module syntax, so run it in an ES-module project or adapt the import for your project’s module setup.
The Puppeteer Page API describes Page.screenshot() as capturing the rendered page and allows the image to be saved to a path: Puppeteer Page.screenshot() API.
#1 Best Overall
- Two-Part Carbonless Invoice Book: Each invoice book has 50 sets of invoices, each with a white/light yellow section, with the yellow section retained in the invoice book to maintain detailed records.
- Consecutively Numbered: Enlarged red 6-digit numbers in the upper right corner of each invoice receipt book help you quickly navigate through your orders.
- Wraparound Divider Flap: A thick folded cardboard divider is integrated into the back of each invoice book for use between each two-part sales order to prevent the written content from rubbing off on subsequent copies of the invoice, resulting in wasted invoices.
- 2 Packs/50 Sets (100 Sets Total): Each invoice book provides 50 sequentially numbered carbonless sets of 2 invoice books for long-term use.
- Customizable Space: Each invoice book for small business has space at the top to add a company seal or sticker.
Wait for the invoice itself to be ready
waitUntil: 'networkidle2' is a navigation condition, not a guarantee that a client-rendered invoice is complete. An application may load invoice data after navigation or render it only after another event. For reliable captures, wait for a readiness condition that actually applies to the page.
- If the page exposes a known invoice container, wait for that selector with
page.waitForSelector('YOUR_REAL_SELECTOR'). Replace the example string with a selector from the actual page; do not guess one. - If the application sets a reliable loaded state, wait for that state with an appropriate page condition.
- Use a fixed delay only when there is no better readiness signal; it can be unnecessarily slow or still too short when load times vary.
Set the viewport before navigating because responsive layouts can change the invoice’s dimensions and arrangement. Puppeteer’s Page API documents device emulation as changing user-agent and viewport metrics: Puppeteer Page API.
Rank #2
- QUALITY INVOICES: Adams Order books provide a professional invoice or customer receipt; a great way to create and maintain a professional image for small businesses and service providers
- 50 TWO-PART CARBONLESS FORMS: Customers get the perforated white top copy; retain the canary and pink copies for your records
- WRAP-AROUND COVER: Fold the back cover between sets to keep invoices neat and legible
- ROOM FOR CUSTOMIZATION: A blank space at top leaves room for your company stamp; a big savings over custom-printed forms
- CONSECUTIVELY NUMBERED: Large 6-digit numbers in the upper right hand corner help you thumb through orders quickly
Choose a full-page image or a viewport capture
Set fullPage: true to capture the page beyond the visible viewport, which is useful when an invoice continues below the fold. Omit it, or set it to false, to capture only the current viewport. Check the resulting file: page layout, responsive behavior, and browser rendering can affect what appears in the capture.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use a PDF when the output is for printing
For a print-oriented document, call Puppeteer’s page.pdf() instead of page.screenshot(). PDFs use print CSS by default. To render using screen media styles, call await page.emulateMediaType('screen') before generating the PDF. Print styles can change colors; CSS using -webkit-print-color-adjust can request exact colors where appropriate, but review the generated file because the page’s own print styling affects the result.
Rank #3
- QUALITY INVOICES: Adams Invoice books provide a professional invoice or customer receipt; easily customize by using the extra space at the top and your company stamp
- 50-TWO PART CARBONLESS FORMS: Customers get the perforated white top copy; retain the yellow copy for your records
- WRAP-AROUND COVER: Fold the back cover between sets to keep invoices neat and legible
- CONSECUTIVELY NUMBERED: Large 6-digit numbers help you thumb through invoices quickly
- STOCK UP: Each book includes 50 white/canary sets; order several to keep your favorite forms on hand
See the Puppeteer PDF API and Puppeteer PDF generation guide.
A screenshot does not verify GST compliance
A screenshot only shows what the browser rendered; it is not a compliance check. CBIC’s invoice rules include particulars such as supplier name, address and GSTIN; a consecutive serial number unique for the financial year; issue date; recipient information where applicable; HSN code or accounting code for services; description; values; and tax particulars. Rule 46 on the government tax information portal also states that the serial number must not exceed sixteen characters and must be unique for a financial year. Applicability depends on transaction and taxpayer circumstances, so consult the current rules and amendments for compliance decisions.
Rank #4
- This value 3 pack of Adams Invoice Books give you 150 two part carbonless invoices with a perforated white customer receipt and yellow duplicates for your records; 3 50-invoice books per pack
- Unique horizontal invoice sheets capture the purchased by and shipped to addresses; a compact 5-9/16 x 8-7/16 page still leaves plenty of room for details on up to 12 items sold
- Wraparound back cover prevents write-through between sets; pull out the perforated white customer receipt and the yellow carbonless duplicates stay behind for your records
- Unique 6 digit invoice numbers help you thumb through orders quickly; blank space up top gives you room for a company stamp—an affordable custom touch
- In value packs with three 50-invoice books for your small business; buy ahead to keep on site or take on the road for pop-up shop sales
Troubleshoot common capture problems
- The screenshot is blank or missing invoice data: Navigation may have completed before the application rendered its content. Wait for the page’s real invoice selector or loaded state before taking the screenshot.
- The image cuts off the invoice: Use
fullPage: trueif you need content below the viewport, and confirm that the page has finished rendering before capture. - The layout differs from the page you expected: Set the intended viewport before
page.goto(); responsive pages can render differently at different dimensions. - The PDF looks different from the screenshot: PDF generation applies print CSS by default. Use
page.emulateMediaType('screen')beforepage.pdf()if you need screen media styles, then inspect the output. - The PDF colors are altered: Print color adjustment may affect colors. Where appropriate, use
-webkit-print-color-adjustin the page’s CSS and review the saved PDF.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A GET request returns a PNG, JPEG, WebP, or PDF. For a straightforward invoice page, this cURL call saves a WebP capture; see the ScreenshotNeo documentation for API options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/invoice/123 -o gst-invoice.webp
ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots.
Sign up for 1,000 free screenshots a month with no card.
Best Value
- 2 part carbonless forms (White originals, Canary duplicates) for invoicing customers
- Wraparound cover attached to back to place between sets
- Consecutively numbered within each book
- 50 sets per book
- Space at top for company stamp
Frequently Asked Questions
Can Puppeteer capture a GST invoice as a PDF?
Yes. Use page.pdf() for a print-oriented document; Puppeteer applies print CSS by default.
Does taking a screenshot show that an invoice is GST-compliant?
No. A screenshot records the rendered page and does not validate compliance with GST invoice rules.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

