IRONSOFTWAREHOME
Check & Restart IronPdfEngine

import com.ironsoftware.ironpdf.*;

// Recover automatically if IronPdfEngine was interrupted (host restart, crash, or kill)
if (!IronPdfEngineManager.isEngineActive()) {
    IronPdfEngineManager.restartEngine();
}

// Continue as normal; the engine is now guaranteed to be connected
PdfDocument pdf = PdfDocument.renderHtmlAsPdf("<h1>Hello World</h1>");
pdf.saveAs("output.pdf");
mvn install
Check & Restart IronPdfEngine

Check & Restart IronPdfEngine

IronPdfEngine performs every PDF operation for IronPDF for Java, and it manages its own lifecycle automatically: it starts on the first call and stops when the application exits. Long-running services occasionally need to step in, for example when a remote host restart, an operating system kill, or a native crash interrupts the engine. The IronPdfEngineManager class provides static, thread-safe methods to check the engine's health and to start, stop, or restart it.

The code example uses the watchdog pattern. IronPdfEngineManager.isEngineActive() reports whether the engine is connected, and IronPdfEngineManager.restartEngine() forces a clean reconnect when it is not, clearing stale connection state before the next render. restartEngine() is the recommended recovery action. Most applications never need it, since the lifecycle is automatic, but it is valuable for hardening a service that must stay available.

One limitation applies when you supply your own gRPC channel through IronPdfEngineConnection.withCustomGrpcConnection: stopEngine() and restartEngine() are not available in that mode because the caller owns the channel, while isEngineActive() and startEngine() work everywhere.

Learn more in the Set Up IronPdfEngine guide.

Ready to Get Started?

Version:2026.8just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
Java Maven Library for PDF
Install with Maven

Version: 2026.8

<dependency>
   <groupId>com.ironsoftware</groupId>
   <artifactId>ironpdf</artifactId>
   <version>2026.8.2</version>
</dependency>
https://central.sonatype.com/artifact/com.ironsoftware/ironpdf/2026.8.2
or
Java PDF JAR
Download JAR

Version: 2026.8

Manually install into your project