Use Playwright’s page.screenshot() after the invoice has rendered. It saves the visible browser viewport by default; set fullPage: true for the full scrollable page, or take a locator screenshot to capture only the invoice panel.
Capture a GST invoice webpage with Playwright
The examples below use JavaScript and assume you already have a running Playwright page and an invoiceUrl. Replace the example URL and locator with values for your application.
As an Amazon Associate I earn from qualifying purchases.
await page.goto(invoiceUrl);
await page.screenshot({ path: 'gst-invoice.png' });
This writes a PNG of the current viewport. Navigation finishing does not necessarily mean that data or client-rendered invoice content is ready. Wait for a project-specific condition that signals the invoice has rendered before taking the screenshot.
Choose what to capture
| What you need | Example | What it captures |
|---|---|---|
| Visible viewport | await page.screenshot({ path: 'gst-invoice.png' }); |
The current viewport; fullPage defaults to false. |
| Entire scrollable page | await page.screenshot({ path: 'gst-invoice-full.png', fullPage: true }); |
A tall screenshot of the full page, including content below the fold. |
| Invoice region only | await page.getByTestId('invoice').screenshot({ path: 'gst-invoice.png' }); |
The element matched by the locator, without unrelated page content. |
| Image buffer for processing | const image = await page.screenshot(); |
Returns image data instead of writing a file. |
Take a full-page screenshot
await page.goto(invoiceUrl);
// Wait for your application's invoice-ready condition here.
await page.screenshot({ path: 'gst-invoice-full.png', fullPage: true });
Playwright describes this as a screenshot of the “full scrollable page, as if you had a very tall screen and the page could fit it entirely.” A full-page capture can include navigation, footers, or other unrelated UI, so use it when that wider context is useful.
#1 Best Overall
- FULL HD IPS DISPLAY - Enjoy vibrant, crystal-clear images with 178-degree wide-viewing angles
- AMD RYZEN 3 30 PROCESSOR - Everyday performance you can count on; Multitask, stream, game casually, and edit photos smoothly with responsive power and vibrant HDR visuals
- ENJOY UP TO 14 HOURS AND 15 MINUTES OF BATTERY LIFE - HP Fast Charge restores battery from 0 to 50% in approximately 45 minutes
- AMD RADEON 610M GRAPHICS - Experience smooth entertainment; Built for streaming and multitasking, enjoy realistic visuals and efficient performance for work and play
- STORAGE AND MEMORY - 512 GB PCIe NVMe M.2 SSD offers fast speed and efficient storage; and 8 GB LPDDR5 RAM memory boosts performance with higher bandwidth
Capture only the invoice element
await page.goto(invoiceUrl);
// Wait for your application's invoice-ready condition here.
await page.getByTestId('invoice').screenshot({ path: 'gst-invoice.png' });
invoice is illustrative: the target page must actually have that test ID. If it does not, use a locator based on a meaningful role, label, or text, and confirm that it matches the intended invoice element uniquely. Locator screenshots capture the matched element; a narrow capture may omit surrounding context.
Get the screenshot as a buffer
const image = await page.screenshot();
When no path is supplied, Playwright returns image data as a buffer. Use this when your code needs to process or forward the image rather than save it directly to a local file.
Rank #2
- Intel Celeron N4120: 4 Cores & Threads, 1.1GHz Base Clock, Up to 2.6GHz Boost Clock, 4MB Cache, Intel UHD Graphics 600. The perfect combination of performance, power consumption, and value helps your device handle multitasking smoothly and reliably with four processing cores to divide up the work.
Make captures more repeatable
A screenshot records the browser’s rendered output at capture time. For useful, repeatable artifacts, make the page state predictable before capturing it:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match- Wait for an application-specific invoice-ready signal, such as a locator becoming visible, instead of assuming
page.goto()means all dynamic invoice content is ready. - Choose viewport, full-page, or element capture based on the evidence you need; each shows a different amount of context.
- For test artifacts, consider the screenshot API’s
animations: 'disabled'option to avoid animation changing the captured frame. Check the API documentation matching your installed Playwright version for option availability. - Protect personal and commercial invoice details when saving, processing, or sharing screenshot files.
The Page API also documents clipping, output type, quality where applicable, image scale, and animation options. Consult the Playwright Page API for the options supported by your installed version. The Playwright screenshots guide and Locator API cover page and element screenshots.
Rank #3
- Stunning 15.6" FHD IPS Display: Experience crisp 1920x1080 resolution on this 15.6 inch laptop with an IPS panel that delivers wide viewing angles and vivid colors. The narrow-bezel design maximizes screen real estate for comfortable viewing on this Win 11 laptop, whether you're studying or working.
- Celeron J4105 Processor & 256GB SSD: Powered by a reliable Celeron J4105 processor paired with 12GB DDR4 memory and a fast 256GB M.2 SSD. This laptop computer supports SSD expansion up to 2TB and TF card expansion up to 1TB, so your storage grows with your needs. Delivers smooth multitasking for daily productivity.
- AI-Powered Win 11 Laptop: Built-in AI features enhance your productivity with smart assistance for writing, summarizing, and task management. Pre-installed with Win 11 and includes Office 365 subscription. This student laptop is backed by 1-year warranty and 24/7 customer support.
- All-Day 7000mAh Battery & 180° Hinge: The high-capacity 7000mAh battery keeps this laptop powered through long classes or meetings. The 180-degree lay-flat hinge lets you share your screen effortlessly during presentations. This durable laptop computer adapts to your dynamic workflow.
- Versatile Connectivity Hub: Equipped with USB 3.2, Type-C, Mini HDMI, and 3.5mm audio jack to connect all your peripherals. Stay online anywhere with high-speed 5G WiFi and Bluetooth 4.2. This college laptop keeps you connected at home, in the library, or on the go.
What a screenshot does—and does not—show about a GST invoice
Here, “GST invoice” means an invoice under India’s Goods and Services Tax system. India’s invoice requirements vary with transaction circumstances; the CBIC invoice rules describe particulars including supplier details and GSTIN, a financial-year-unique serial number, issue date, description, values, tax rates and amounts, and recipient particulars subject to conditions. The CBIC Rule 46 page describes the serial number as no more than sixteen characters and unique for a financial year. The CBIC invoice rules, CBIC Rule 46, and the GST Portal GSTR-1 guide provide official context.
A Playwright screenshot captures what the webpage rendered. It does not establish that a GSTIN is valid, tax rates or calculations are correct, the document is complete, or the invoice is legally sufficient. This is technical guidance, not legal advice. For a GST regime outside India, consult that jurisdiction’s official requirements.
Rank #4
- Efficient Performance for Everyday Computing: Powered by Intel N150 processor with up to 3.6 GHz Intel Turbo Boost Technology, 6 MB L3 cache, 4 cores, and 4 threads, this HP laptop delivers responsive performance for web browsing, streaming, document editing, and multitasking. Paired with 4GB LPDDR5 RAM and 128GB UFS storage, it handles daily tasks smoothly. Includes 1-year Microsoft 365 Personal subscription for Word, Excel, PowerPoint, and cloud storage to maximize your productivity.
- 14-Inch HD Micro-Edge Display:Enjoy clear visuals on the 14-inch HD (1366 x 768) anti-glare screen with 250-nit brightness and 62.5% sRGB coverage. The micro-edge bezel delivers a 79% screen-to-body ratio in a compact design. An HP True Vision 720p HD camera with noise reduction and dual-array microphones supports clear video calls, remote work, and online learning.
- Modern Connectivity and Wireless Technology: Stay connected with Wi-Fi 6 (2x2) for faster wireless speeds and Bluetooth 5.4 for seamless pairing with accessories. Versatile port selection includes 1 USB Type-C 10Gbps with DisplayPort 1.2 for external displays, 2 USB Type-A 5Gbps ports for peripherals, 1 HDMI 1.4b port, 1 headphone/microphone combo jack, and 1 multi-format SD media card reader. Connect monitors, transfer files quickly, and expand your workspace with ease.
- All-Day Battery Life and Portable Design: Enjoy up to 11 hours of video playback, 7.5 hours of mixed usage, or 7.5 hours of wireless streaming on a single charge, perfect for students and professionals on the go. Weighing just 3.24 lb and measuring 12.76" x 8.86" x 0.71", this lightweight laptop fits easily in backpacks and bags. The stylish willow green top cover with matte finish and natural silver keyboard deck with vertical brushing pattern offer a modern, professional look.
- AI-Enhanced Productivity: Access Microsoft Copilot instantly with the dedicated Copilot key for faster assistance. AI Noise Reduction filters background sounds and improves voice clarity during calls. Dual speakers provide clear audio, while the full-size natural silver keyboard and HP Imagepad support comfortable typing and navigation.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF. Its clean-shot steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients.
For an invoice page, the API call is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/invoice -o gst-invoice.webp
See the ScreenshotNeo API documentation for request options, including output formats and capture settings. ScreenshotNeo includes 1,000 shots per month on its free plan with no card required; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card.
Frequently Asked Questions
Does Playwright save a screenshot as PNG by default?
Yes. The examples that use a .png path save a PNG file.
Best Value
- 【Expansive Display】The 14 Non-touch display offers clear, and anti-glare coating, perfect for both work and entertainment.
- Designed for mobility with a slim 0.71-inch profile and lightweight, making it easy to carry between home, office
- 【Versatile Connectivity】 connected with multiple ports including USB 3.0 Type-C, and a headphone/mic combo jack, with Wi-Fi and Bluetooth for seamless wireless networking.
- One Year Microsoft 365
Can I use a different output format?
The Playwright Page API documents screenshot output-type options; check the documentation for the version installed in your project.
Does capturing an invoice screenshot verify its tax details?
No. It is a visual capture of the rendered page, not validation of the invoice’s tax or legal correctness.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix 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.

