What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
For modern HTML, CSS, JavaScript, and web fonts, use a real Chromium browser through Playwright Java and call page.screenshot(). It can save PNG, JPEG, or WebP files, return image bytes, capture the full page, or capture one locator. For controlled XHTML templates, a JVM-native renderer such as Flying Saucer is lighter and more deterministic. OpenHTMLtoPDF is another pure-Java option, but it does not execute JavaScript and does not support many modern layout features. Choose the renderer that matches the document you need to reproduce.
Choose the right Java renderer
| Approach | Best fit | JavaScript and CSS | Runtime dependency | Output |
|---|---|---|---|---|
| Playwright Java | Websites and app pages using current browser features | Runs JavaScript; Chromium CSS and layout | Playwright plus a browser installation | File or in-memory byte[] |
| Flying Saucer | Well-formed XHTML/CSS templates rendered inside the JVM | XML/XHTML and CSS-oriented; not a general browser | Java libraries | BufferedImage or image file |
| OpenHTMLtoPDF | Pure-Java, deliberately constrained XHTML documents | No JavaScript; many modern standards, including flex and grid, are absent | Java libraries | Image or PDF-oriented renderer output |
| wkhtmltoimage | Projects that can deploy an external command | Qt WebKit, not a current Chromium engine | External LGPLv3 executable | Image file through command line |
There is no reliable, comparable benchmark in the cited official documentation, so do not select a renderer from an invented speed or accuracy number. Record the renderer version, browser build, fonts, viewport, and output format with each generated image so visual changes can be investigated.
Capture a web page with Playwright Java
Playwright is the practical default when the source is a normal web page. It executes page scripts, applies browser media queries, loads web fonts, and can wait for content before the capture. The example below writes a full-page PNG.
Project dependency and browser setup
Add the Playwright Java dependency using the version you have standardized for your project, then install the matching Playwright browsers as part of your build or deployment process. Playwright uses open-source Chromium builds by default for Chromium-based projects; package that browser and its system requirements with your application rather than assuming a developer workstation has them.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows 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 reinstall#1 Best Overall
- AV To HDMI Converter 3.0 - Convert & Upscale RCA / S-Video / Analog Video Input to HDMI (TV or Monitor) at 1080P or 720P - Plug and Play Adapter with No Computer or Drivers Required
- Upscaler Compatible with VCR, VHS, Camcorders, Hi8, Gaming Systems, Set-Top Boxes, DVD Players, & More. RCA/AV/Composite and S-Video Input. HDMI Output. Works with PAL and NTSC. (Important Note: Does NOT Downscale HDMI to RCA/AV/S-Video)
- NEW! Remote Control Included - Fine Tune Your Video's Image Quality By Adjusting Brightness, Contrast, Saturation, Hue, Resolution (1080P or 720P), Aspect Ratio (Preserve Original 4:3 Look with Black Bars or Stretch To 16:9 HD Widescreen To Fill Your TV Screen)
- NEW! S-Video Input - Allows S-Video Input From Camcorder, VCR, DVD Player, & More - Providing The Highest Possible Video Quality From These Sources (S-Video Cable Not Included - RCA/AV Cable Required For Audio Signal)
- Includes 2-Year Warranty & Tech Support from ClearClick, a USA-Based Small Business (Extendable to 3 Years for Free - See User's Manual)
Runnable full-page example
import com.microsoft.playwright.Browser;
import com.microsoft.playwright.BrowserType;
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Playwright;
import java.nio.file.Paths;
public class HtmlToImage {
public static void main(String[] args) {
try (Playwright playwright = Playwright.create()) {
Browser browser = playwright.chromium().launch(
new BrowserType.LaunchOptions().setHeadless(true));
Page page = browser.newPage(new Browser.NewPageOptions()
.setViewportSize(1440, 900)
.setDeviceScaleFactor(1));
page.navigate("https://example.com");
page.screenshot(new Page.ScreenshotOptions()
.setPath(Paths.get("page.png"))
.setFullPage(true)
.setType(Page.ScreenshotType.PNG));
browser.close();
}
}
}
setFullPage(true) expands the capture beyond the visible viewport. Set the viewport explicitly: width, height, and device scale affect media queries, line wrapping, and pixel dimensions. For a viewport-only shot, omit setFullPage or set it to false.
Return bytes instead of writing a file
byte[] image = page.screenshot(new Page.ScreenshotOptions()
.setType(Page.ScreenshotType.WEBP)
.setQuality(85));
// Store image, send it over HTTP, or pass it to an image-processing library.
PNG is lossless and has no quality setting. JPEG and WebP can reduce size; JPEG quality is relevant only to JPEG output. Playwright also supports CSS/device scale controls, timeout settings, animation handling, and locator screenshots.
Capture one element
page.locator(".invoice").screenshot(new Locator.ScreenshotOptions()
.setPath(Paths.get("invoice.png"))
.setType(Page.ScreenshotType.PNG));
Locator capture is useful for cards, invoices, charts, and components. The element must be present and renderable; wait for its data and fonts before capturing.
Wait for asynchronous content
page.navigate("https://example.com/dashboard");
page.locator("[data-report-ready]").waitFor();
page.waitForTimeout(300); // only when a short, known visual transition remains
page.screenshot(new Page.ScreenshotOptions()
.setPath(Paths.get("dashboard.png"))
.setFullPage(true));
Prefer a meaningful readiness selector or network-idle strategy over an arbitrary long sleep. Disable or wait out animations when deterministic pixels matter. Set an explicit navigation and screenshot timeout so a stalled page fails predictably.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- Composite to HDMI Converter: Converts analog AV composite (Yellow, White, Red) input to HDMI 720P/1080P (60HZ) output, displayed on smart TV, Projector or HD Display, which bring back your old and cherish memories.
- Plug to Play: This HDMI Converter no extra drivers need, just plug and play,easy to use. Please hook up the USB Power Cable (included) to 5V power source during use. Note: The Video Converters only support converts AV to HDMI, can't converts HDMI to AV.
- Widely Used: This composite to hdmi adapter is widely applied to PS1, PS2, PS3, Xbox, N64, Wii, STB, VHS, VCR, DVD Players and other devices with standard composite AV input. Note: It can only be used when PS2 is set to RGB output.
- Wide Compatibility: This Video Audio Converter Adapter supports source formats of PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N standard TV. Provide advanced signal processing with great precision, colors, resolutions, and details. Important Note: This converter can't improve video quality!
- Attention & Package: Please ensure to connect this av hdmi converter to power source to make it work. Package include: 1*AV to HDMI Adaptor, 1*USB Power Cable(adapter not included), 1*User Manual.
Render XHTML as a BufferedImage with Flying Saucer
Flying Saucer’s org.xhtmlrenderer.simple.ImageRenderer renders a document directly to an image. It expects well-formed XML/XHTML and CSS rather than arbitrary browser HTML. Supply an output width; use the height overload when you need a fixed canvas. Without a fixed height, the renderer can derive the document height.
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.io.File;
import org.xhtmlrenderer.simple.ImageRenderer;
public class XhtmlImage {
public static void main(String[] args) throws Exception {
BufferedImage image = ImageRenderer.renderToImage(
"file:/opt/templates/invoice.xhtml", 1200);
ImageIO.write(image, "png", new File("invoice.png"));
}
}
For a fixed canvas, use the corresponding overload with width and height. A BufferedImage lets you compose, annotate, resize, or stream the result before writing it.
Make resources resolvable
Give relative images, stylesheets, and fonts a stable base URL. Use absolute URLs or a document URL that correctly resolves relative paths. Normalize malformed HTML to XHTML before rendering; browser-tolerated markup can fail when an XML parser requires closed tags and valid nesting.
Use OpenHTMLtoPDF for a constrained pure-Java template
OpenHTMLtoPDF is appropriate when you control the markup and can stay within its supported XHTML and CSS subset. Its documentation explicitly states that it is not a web browser: it does not run JavaScript and does not implement many modern standards such as flexbox and grid. Build layouts with supported CSS 2.1-style techniques, test fonts and page dimensions, and do not expect a React or dashboard page to render as it does in Chromium. Its image-capable APIs can be integrated into a Java pipeline, but verify the exact artifact and method for the library version you pin.
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 →Rank #3
- Input: RCA, Output: HDMI; Converts Analog Composite Input to HDMI 1080p or 720p Output.
- RCA to HDMI Converter - Plug and Play, Easy to Install and Operate, Powered by External USB Cable.
- RCA to HDMI Converter supports connecting HDMI capture card (note that we do not include HDMI capture card).
- Composite to HDMI Converter Widely Applied to PS One, PS2, PS3, N64, WII, WII U, STB, VHS, VCR, Blue-Ray DVD Players Projector (Note: It can only be used when PS2 is set to RGB output).
- AV to HDMI Converter Support PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N tv format.
When wkhtmltoimage is acceptable
wkhtmltoimage is an external LGPLv3 command-line utility based on Qt WebKit. It can be useful when a separate executable is easy to deploy and your pages are compatible with that older engine. It is not a Java API, and its rendering behavior is not equivalent to a current Chromium browser. Treat the executable, operating-system packages, process limits, and licensing obligations as deployment dependencies.
Production checklist
- Pin the Java library, browser, and font versions.
- Set viewport dimensions and device scale explicitly.
- Wait for a readiness selector, required data, and web fonts.
- Choose full-page, viewport, or locator capture deliberately.
- Resolve all relative resources from a stable base URL.
- Keep untrusted HTML isolated: browser rendering executes page content and may make network requests. Apply your own sandbox, egress, and credential policy.
- Record renderer, browser build, viewport, scale, URL or template revision, and image format with the output.
- Use bounded navigation and screenshot timeouts, and close browser contexts in a
try-with-resourcespath.
Troubleshooting
The image is blank or only partly rendered
The capture probably ran before asynchronous content, fonts, or images completed. Wait for a stable selector, verify network requests, and ensure lazy-loaded content is triggered before the screenshot.
CSS looks different from the browser
Check viewport width, device scale, media queries, missing fonts, and the renderer choice. Flexbox, grid, and JavaScript-heavy pages require Playwright; OpenHTMLtoPDF and Flying Saucer are not drop-in browser replacements.
Flying Saucer throws XML or resource errors
Validate XHTML, close every element, escape ampersands, and provide a base URL. Confirm that image, CSS, and font paths are readable by the Java process.
Recommended Free Tools
Rank #4
- RCA to HDMI Converter: Converts analog RCA composite (Yellow, White, Red) input to HDMI 720P/1080P (60HZ) output,displayed on HDTV/Monitor,which can bring back your childhood memories.
- Plug to Play: ABLEWE Mini RCA to HDMI converter no extra drivers need, just plug and play,easy to use.Please hook up the USB power cable (included) to 5V power source during use.
- Wide Compatibility: Support source formats of PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N standard TV. Provide advanced signal processing with great precision, colors, resolutions, and details.
- Widely Used:Widely applied to PS2,PS3,Xbox,N64, WII, STB, VHS, VCR, DVD Players and other devices with standard composite AV input.
- Attention & Package:Please ensure to connect this rca to hdmi converter to power source to make it work.Package include:1*RCA to HDMI Converter,1*usb power cable(adapter not included),1*User Manual.
Playwright cannot launch Chromium
Install the browser binaries that match your Playwright version and install required operating-system libraries in the deployment image. Do not rely on a locally installed Chrome unless your launch configuration intentionally points to it.
Full-page capture is unexpectedly huge
Inspect unbounded elements, infinite-scroll handlers, and sticky components. Capture a locator or a fixed viewport when a complete document image is not required.
Output files are too large
Use WebP or JPEG where lossless PNG is unnecessary, lower JPEG/WebP quality, reduce device scale, or capture only the required element.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo provides a one-request website screenshot API and MCP server. It removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP tools—take_screenshot, get_page_info, and capture_pdf—work with Claude, Cursor, and other MCP clients.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteUse the ScreenshotNeo API documentation for all options, including full-page capture, element selectors, dark mode, device presets, retina scale, custom CSS and JavaScript, waits, request blocking, headers, cookies, user agents, timezone, geolocation, transparent backgrounds, resizing, caching, signed links, asynchronous webhooks, bulk capture, and usage information.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The Free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is included on every plan. Create a free ScreenshotNeo account.
Best Value
- Convert RCA to HDMI Instantly – BD&M RCA to HDMI Converter easily converts analog RCA/composite AV signals to HDMI output, allowing you to connect older devices to modern HDTVs, monitors, and projectors with clear video and audio quality.
- Wide Device Compatibility – Supports VHS players, VCRs, DVD players, camcorders, retro gaming consoles, and more including PS1, PS2, PS3, Xbox, N64, Wii, and older AV devices with standard RCA output.
- 1080P HDMI Output – Advanced signal processing delivers stable and sharp video output with support for 720P/1080P HDMI resolution, improving compatibility with modern TVs and displays.
- Plug & Play Setup – No drivers or software required. Simply connect the RCA cables, HDMI cable, and included USB power cable for quick and easy installation in minutes.
- Compact & Reliable Design – Lightweight mini converter design makes it perfect for home entertainment setups, retro gaming, travel, or converting old media collections while maintaining stable performance.
FAQ
Can Java convert an HTML string without hosting it?
Yes. Browser automation can load an HTML document or data URL, while JVM-native renderers can read a local XHTML file or stream. Ensure relative resources have a resolvable base URL.
Which format should I choose?
Use PNG for lossless UI, text, and pixel comparisons; JPEG for photographic pages; WebP when supported by your delivery pipeline and you want smaller files.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Is a screenshot the same as printing HTML?
No. A screenshot is a rasterized viewport or document image. Print/PDF layout follows different pagination rules, margins, and page dimensions.
Frequently Asked Questions
Can I post-process Playwright’s image in Java?
Yes. Use the overload that returns a byte array, then pass it to ImageIO or another image-processing library.
How do I make repeated captures reproducible?
Pin renderer and browser versions, install the same fonts, set viewport and scale explicitly, wait for deterministic readiness, and record those settings with each image.
Should I use OpenHTMLtoPDF for a JavaScript application?
No. It does not execute JavaScript; use Playwright for pages whose content or layout depends on browser scripts.
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.

