To turn a menu card made in HTML into an image, render it in a real browser and capture just the card—not the surrounding page. Set the card to its intended dimensions, wait for fonts and food photos to load, export PNG, JPEG, or WebP, then inspect the result for legibility and cropping. This method preserves the layout your CSS actually creates and works for menu cards, dish lists, and promotional graphics.
Build the card at its intended size
Start with a fixed-size card frame and place the content inside it. Keep dish names and prices easy to scan, use strong text/background contrast, and leave breathing room around food images and important text. A browser screenshot captures the rendered layout; it does not automatically make a crowded or poorly sized design readable.
As an Amazon Associate I earn from qualifying purchases.
Use CSS pixels to define the layout, then choose the output scale deliberately. If the card is 650 by 700 CSS pixels and you capture at CSS scale, the resulting image is 650 by 700 pixels. A device-scale capture can produce more output pixels for the same CSS-sized card. Playwright documents both screenshot scales, element screenshots, clipping, full-page capture, and PNG, JPEG, and WebP output in its Page screenshot API.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Render and export the card with Playwright
Install Playwright and its Chromium browser in a Node.js project:
#1 Best Overall
- PREMIUM LINEN TEXTURE MENU CARDS 80LB COVER 230GSM CARDSTOCK: Heavyweight 4"x9" cardstock features elegant linen textured finish, great hand feel, reduces ink show through for sharp handwriting and premium looking wedding menu cards
- PRACTICAL 4" X 9" RACK CARD DIMENSION: Versatile menu cardstock offers ample design space, perfect for wedding menus, menu paper, wedding thank‑you notes,reserved seat cards,christmas cards,wedding programs, marketing mailers, announcements and event promotional projects
- ELEGANT TEXTURED PRINTABLE SURFACE: Distinct linen texture adds upscale visual touch for restaurant menus, banquet events, branding and personalized crafts; delivers clean print output without unwanted glare
- INKJET, LASER & COPIER COMPATIBLE: Optimized for home & commercial printers for smooth feeding; produces crisp texts and graphics. Confirm your printer supports 80lb cover weight before printing thick cardstock
- WHAT YOU RECEIVE: 60 pieces blank linen‑textured cards 4×9 in printable cards; ready‑to‑use for menus, special occasions, business communications and assorted DIY printing needs
npm install playwright
npx playwright install chromium
Save the following as render-card.js. It opens a local HTML file, waits for fonts and images, captures the element with the menu-card ID, and writes a PNG. Change the file path, selector, and output name to match your project.
const { chromium } = require('playwright');
const path = require('path');
(async () => {
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({
viewport: { width: 900, height: 1000 },
deviceScaleFactor: 1
});
await page.goto(`file://${path.resolve('menu.html')}`, {
waitUntil: 'networkidle'
});
await page.evaluate(async () => {
await document.fonts.ready;
await Promise.all(
Array.from(document.images, image => {
if (image.complete) return Promise.resolve();
return new Promise(resolve => {
image.addEventListener('load', resolve, { once: true });
image.addEventListener('error', resolve, { once: true });
});
})
);
});
const card = page.locator('#menu-card');
await card.screenshot({ path: 'menu-card.png', type: 'png' });
await browser.close();
})();
Run it with node render-card.js. The browser viewport should be large enough to display the whole card without responsive breakpoints changing the intended layout. The element screenshot keeps the export focused on the card; use a clip instead if your design does not have a single wrapper element.
Choose the capture area
- Element: capture the card container for a single menu asset. This avoids browser-page whitespace and unrelated content.
- Clip: capture a deliberate rectangle when the card is not represented by one element. The clip coordinates are in CSS pixels.
- Full page: use only when the whole page is the deliverable. It may include multiple cards, page backgrounds, or extra content, and can create a much taller image than intended.
Choose the image format
- PNG: supports transparency and is suitable when you need crisp text or a transparent background. Playwright does not apply its JPEG quality setting to PNG.
- JPEG: supports a configurable quality setting and is often smaller for photographic content, but cannot preserve transparency.
- WebP: another supported output format; confirm that the destination accepts it before using it.
For example, change the element screenshot options to { path: 'menu-card.webp', type: 'webp', quality: 85 } for a WebP export. For a transparent PNG, use { path: 'menu-card.png', type: 'png', omitBackground: true }. Transparency depends on the card itself not painting an opaque background.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRank #2
- VERSATILE MENU & PROMOTIONAL USES – Perfect for restaurant menus, drink specials, takeout lists, promotional rack cards, event programs, spa service menus, and retail product lists. The tall 4" x 9" format fits standard menu holders and display racks.
- PREMIUM MATTE NATURAL CREAM CARDSTOCK – Crafted from sturdy 100lb Cover (270gsm) cardstock with a smooth matte finish and warm natural cream tone that gives menus and promotional cards an elegant, professional presentation.
- PRINTER COMPATIBILITY – Designed for smooth feeding and crisp results with most inkjet printers, laser printers, and digital copiers, making it easy to print professional menus and rack cards directly from your office or shop.
- STANDARD 4" x 9" SIZE FORMAT – Classic rack card and menu size ideal for tabletop displays, brochure racks, takeout counters, reception desks, and retail displays. Perfect for tri-section menu layouts, specials lists, or service menus.
- FREE TEMPLATES & ONLINE DESIGNER – Includes downloadable templates plus access to the Desktop Publishing Supplies online template designer so you can quickly customize, format, and print professional menus and rack cards.
Check dimensions and platform requirements
Do not assume one pixel size works for every Indian food-delivery asset. A dish photo, a menu page, a cover image, and a custom promotional card can have different upload rules and crop behavior. Check the current partner-app upload flow for the exact asset type, accepted formats, file-size limit, and whether the platform crops or resizes uploads.
Zomato’s surfaced guideline page gives a maximum of 650 × 700 pixels for menu pages and recommends 1200 × 600 pixels or greater for cover photos. The page does not state a publication year, and those figures refer to different asset types; they are not a verified, current universal specification for HTML-generated cards. See Zomato’s partner resources and confirm the applicable rule in the upload workflow before exporting to those dimensions.
Swiggy’s November 3, 2023 feature article describes capturing and uploading menu images through the Swiggy Owner app and says the feature validates and enhances images, but it does not establish pixel dimensions for HTML-generated menu cards. See Swiggy’s Photoshoot feature article. Do not treat its photo workflow as a specification for a generated card.
Rank #3
- HEAVYWEIGHT 80LB COVER (218GSM) CARDSTOCK: Premium white cardstock provides a professional feel with excellent durability, crisp print quality, clean handwriting performance, and reduced show-through.
- MENU CARD 4" X 9" SIZE: Rack card size provides ample space for menus, promotions, thank you messages, event information, marketing materials, announcements, and customer communications.
- WHITE MATTE FINISH CARDSTOCK: Bright white printable surface delivers excellent contrast for logos, branding, graphics, menus, advertisements, business messaging, and personalized designs.
- INKJET, LASER, & COPIER COMPATIBLE: Designed for dependable performance with inkjet printers, laser printers, and copiers delivering crisp text, vibrant graphics, and smooth feeding for home, office, restaurant, hospitality, and commercial printing use.
- TRUSTED QUALITY, MADE IN THE USA: Manufactured by Desktop Publishing Supplies, a family-owned company with over 30 years of experience producing premium heavyweight cardstock and paper products.
Inspect the exported image before uploading
- Open the exported file, not just the browser preview. Check that the final dimensions and format are what you intended.
- View it at approximately the size a customer will see on a phone. Increase text size or simplify the layout if dish names and prices are hard to scan.
- Check the card edges for clipped text, cut-off food imagery, or an unexpected margin. Vertical photos can lose focal details when cropped, a concern noted in Zomato’s older guidance.
- Confirm that remote images and web fonts finished loading. A network-idle wait is helpful, but sites with continuing network activity may need an explicit selector or a short, controlled wait instead.
- Upload a test asset through the platform’s current partner flow and review its final preview, since platform-side resizing or cropping may change the result.
Troubleshoot common rendering problems
The output is blank or missing images
Check that the HTML path is correct and that image URLs can be reached by the browser process. For remote images, wait for them to load and inspect the browser console or network errors. If the page keeps making requests, networkidle may not be a reliable readiness signal; wait for a specific card selector or image state instead.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →The font differs from the design
Make sure the font file or font service is available to the browser, and wait for document.fonts.ready before capture. If the render runs in a restricted environment, a remote font may fail to load; use an accessible local font file or a reliable system fallback.
The card is clipped or unexpectedly large
Capture the card element rather than the entire page, and verify that the wrapper has the dimensions you intended. Check whether responsive CSS changes at the selected viewport and whether margins, shadows, or overflow extend beyond the frame. Increase the viewport if content is being laid out differently at a narrow width.
Rank #4
- With Square Terminal, you can ring up sales, accept payments, and print receipts, all with one device. Use it at the counter or ring up customers anywhere in your store.
- Accept all major credit and debit cards and pay one low rate with no hidden fees and no long-term contracts.
- Process chip cards in just two seconds.
- Get your money as soon as the next business day.
- Use it cordlessly with the built-in battery, designed to last all day.
The file is too large or transparency is missing
Use JPEG with an intentional quality value for opaque photographic artwork, or WebP if the receiving platform accepts it. For transparency, choose PNG and set omitBackground: true; JPEG cannot retain a transparent background. A PNG quality option will not reduce its size because Playwright does not apply that setting to PNG.
Or skip the browser setup
ScreenshotNeo can render a URL directly to an image or PDF. The following cURL request returns the screenshot bytes; replace the URL with a publicly accessible page containing your card. See the ScreenshotNeo API documentation for request options.
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. See ScreenshotNeo and sign up free.
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.




