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.7 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast?
run a sample watch your HTML become a PDF.