Skip to content
Java

Java Screenshot API for Website Capture and PDF Generation

Add web capture to any Java application — Spring Boot, Micronaut, Quarkus, or standalone services. Capture screenshots, generate PDFs, record videos, and extract HTML without managing browser infrastructure.

What you can build

Enterprise reporting

Generate PDF reports from web dashboards and deliver them to SharePoint, S3, or email pipelines.

Compliance & archival

Screenshot regulated pages with country-accurate rendering and store the evidence in your compliance system.

Authenticated captures

Automate login flows with click and type steps to screenshot internal portals and admin panels.

Batch processing

Submit thousands of URLs for parallel capture from scheduled jobs or message-driven consumers.

What the API handles for you

Every output format

PNG, JPEG, WebP, full-page PDF, raw HTML, and video screencasts from one endpoint.

Automation steps

Click, type, scroll, navigate, and wait before capture — handle logins, cookie banners, and dynamic content.

80+ country routing

Render geo-gated pages from real browsers in any target country.

14+ app integrations

Deliver results to S3, Google Drive, Dropbox, Slack, and more — no upload code needed.

Batch & crawl

Capture entire sitemaps or crawl domains with built-in retries and progress tracking.

On-premise browsers

Run browser clients inside your network for compliance or latency requirements.

Installation

terminal
<!-- Maven -->
<dependency>
  <groupId>com.screenshotcenter</groupId>
  <artifactId>screenshotcenter</artifactId>
  <version>1.0.0</version>
</dependency>
Available on Maven Centralcentral.sonatype.com/artifact/com.screenshotcenter/screenshotcenter

Quick start

Main.java
import com.screenshotcenter.ScreenshotCenterClient;
import org.json.JSONObject;

ScreenshotCenterClient client = new ScreenshotCenterClient("your_api_key");

JSONObject shot   = client.screenshot().create("https://example.com", null);
JSONObject result = client.waitFor(shot.getLong("id"), null, null);
System.out.println(result.getString("status")); // "finished"

More examples

Ciblage géographique
Map<String, String> params = new HashMap<>();
params.put("country", "fr");
params.put("lang", "fr-FR");
JSONObject shot = client.screenshot().create("https://example.com", params);
JSONObject done = client.waitFor(shot.getLong("id"), null, null);
client.screenshot().saveImage(done.getLong("id"), "/tmp/fr.png", null);
Génération de PDF
Map<String, String> params = new HashMap<>();
params.put("pdf", "true");
JSONObject shot = client.screenshot().create("https://example.com", params);
JSONObject done = client.waitFor(shot.getLong("id"), null, null);
client.screenshot().savePdf(done.getLong("id"), "/tmp/page.pdf");
Gestion des erreurs
import com.screenshotcenter.*;

try {
    JSONObject result = client.waitFor(id, null, 60_000L);
} catch (ScreenshotFailedError e) {
    System.err.println("Failed: " + e.getReason());
} catch (TimeoutError e) {
    System.err.println("Timed out after " + e.getTimeoutMs() + "ms");
} catch (ApiError e) {
    System.err.println("API error " + e.getStatus() + ": " + e.getMessage());
}
Crawl de site web
JSONObject crawl = client.crawl().create("https://example.com", "example.com", 100, null);
JSONObject result = client.crawl().waitFor(crawl.getLong("id"), null, null);
System.out.println(result.getInt("total_discovered"));

Resources

Frequently asked questions

Do I need Selenium or Playwright for Java screenshots?

No. ScreenshotCenter handles browser infrastructure. Add the SDK dependency, call the API, and get results — no WebDriver setup required.

Does it work with Spring Boot?

Yes. The SDK is a standard Maven/Gradle dependency that works in any Java 11+ runtime, including Spring Boot, Micronaut, and Quarkus.

Can I generate PDFs from Java?

Yes. Set the pdf parameter to true and configure paper size, margins, and orientation in the API request.

How do I screenshot authenticated pages?

Use automation steps to type credentials, click buttons, and navigate before the capture — all defined in the API request.

Related

Start capturing with Java today

Get 500 captures on the free trial — no credit card required. Install the SDK and take your first screenshot in minutes.