How to Connect to a Remote IronPdfEngine from Python
IronPDF for Python ships as a fully self-contained package — IronPdfEngine is not required by default. Unlike the Java version of IronPDF, where the engine is bundled and mandatory, the Python library handles PDF generation, editing, and reading entirely on its own. IronPdfEngine becomes relevant only when your architecture calls for a shared, centralized PDF rendering service that multiple applications or processes can connect to over the network.
When that pattern makes sense for your infrastructure, connecting to a remote IronPdfEngine instance takes just two lines of configuration code. The IronPdfConnectionConfiguration class accepts a host address and port, and from that point forward every IronPDF call in the current process is forwarded to the remote engine over gRPC.
Quickstart: Connect to a Remote IronPdfEngine from Python
Assume IronPdfEngine is already running at 123.456.7.8:33350. Install IronPDF, then configure the remote connection before any PDF operations:
//:path=shell
:ProductInstall//:path=shell
:ProductInstall//:path=use-ironpdfengine.py
from ironpdf import Installation, IronPdf
# Direct all IronPDF calls to the remote engine
Installation.ConnectToIronPdfHost(
IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350")
)//:path=use-ironpdfengine.py
from ironpdf import Installation, IronPdf
# Direct all IronPDF calls to the remote engine
Installation.ConnectToIronPdfHost(
IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350")
)Place the ConnectToIronPdfHost call at the top of your application, before any IronPDF rendering or document operations. After this configuration, all subsequent IronPDF calls in the process are routed to the remote engine automatically.
How to Use IronPdfEngine as a Remote Server
- Install the IronPDF package from PyPI using pip.
- Ensure the remote IronPdfEngine server is running and reachable on your network.
- Use the
IronPdfConnectionConfigurationclass to configure the remote server address. - Call
Installation.ConnectToIronPdfHost()at application startup, before any PDF operations. - Proceed with IronPDF calls — all rendering is handled by the remote engine.
Start using IronPDF in your project today with a free trial.
When Should You Use Remote IronPdfEngine?
The default local mode covers the majority of Python PDF use cases. A remote IronPdfEngine setup is worth considering in specific architectural scenarios.
High-traffic, shared PDF services are the most common reason. When several microservices or background workers all need to generate PDFs, spinning up a single IronPdfEngine instance and routing all requests through it keeps resource consumption predictable and eliminates the overhead of loading the engine in each separate process.
Containerized deployments also benefit from the separation. In a Docker or Kubernetes environment, isolating the PDF workload into its own container gives you independent scaling: you can scale the rendering service without touching your application tier. The IronPdfEngine container exposes a gRPC port, and each application container sends rendering requests over the internal network.
Separating the PDF workload from the main application process matters when rendering is CPU- or memory-intensive. Offloading that work to a dedicated engine container prevents the main process from being blocked during large document operations, and it simplifies performance monitoring since the engine's resource consumption is isolated.
For projects where none of these apply — single-process scripts, small-volume automations, or local development work — the default mode is simpler and equally capable.
How Do You Install IronPDF for Python?
Installing IronPDF for Python requires pip and an active Python environment. The package is distributed through PyPI.
//:path=shell
pip install ironpdf//:path=shell
pip install ironpdfNo additional engine download is required for local usage. When you install the package, the engine components are included automatically. For remote mode, the engine runs separately (see the pull-and-run guide linked below) and your application connects to it over gRPC.
How Do You Configure the Remote Connection?
Configuring the remote connection requires one import and one method call. The IronPdfConnectionConfiguration.RemoteServer() method accepts a host-and-port string in the format "host:port".
//:path=use-ironpdfengine-configure.py
from ironpdf import Installation, IronPdf
# Configure the connection to a remote IronPdfEngine instance
# Replace with your server's actual address and port
Installation.ConnectToIronPdfHost(
IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350")
)//:path=use-ironpdfengine-configure.py
from ironpdf import Installation, IronPdf
# Configure the connection to a remote IronPdfEngine instance
# Replace with your server's actual address and port
Installation.ConnectToIronPdfHost(
IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350")
)Place this configuration block at the entry point of your application — for example, at the top of your main.py or inside your application startup handler — before any call that creates or reads a PDF document. All subsequent IronPDF operations in that process will route through the remote engine without any additional configuration per call.
How Do You Verify the Remote Connection Is Working?
After calling ConnectToIronPdfHost, run a minimal rendering test to confirm the remote engine is responding correctly. The example below renders a short HTML string and saves it to disk.
//:path=use-ironpdfengine-verify.py
from ironpdf import Installation, IronPdf, ChromePdfRenderer
# Configure the remote connection
Installation.ConnectToIronPdfHost(
IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350")
)
# Render a simple HTML string to verify the engine is connected
renderer = ChromePdfRenderer()
pdf = renderer.RenderHtmlAsPdf("<h1>Connection verified</h1>")
pdf.SaveAs("output/connection-test.pdf")//:path=use-ironpdfengine-verify.py
from ironpdf import Installation, IronPdf, ChromePdfRenderer
# Configure the remote connection
Installation.ConnectToIronPdfHost(
IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350")
)
# Render a simple HTML string to verify the engine is connected
renderer = ChromePdfRenderer()
pdf = renderer.RenderHtmlAsPdf("<h1>Connection verified</h1>")
pdf.SaveAs("output/connection-test.pdf")If the rendering completes without error and connection-test.pdf is created, the remote engine is connected and operational. If the call throws a connection error, verify the host address, check that port 33350 (or your configured port) is open, and confirm the IronPdfEngine Docker container is running.
What Are the Next Steps?
This guide covered how to connect IronPDF for Python to a remote IronPdfEngine instance, including when to use remote mode, how to install the package, and how to configure and verify the gRPC connection.
To put the connected engine to work, explore these resources:
- How to Pull and Run IronPdfEngine — step-by-step instructions for starting the IronPdfEngine Docker container
- Generate PDFs from HTML in Python — use the connected engine to render HTML documents
- Edit Existing PDFs in Python — add annotations, merge documents, and apply stamps
- IronPDF for Python Overview — full getting-started guide with install instructions and first examples
To get started with a free trial license, no credit card is required. For production deployments, view licensing options including team and OEM packages.
Frequently Asked Questions
Is IronPdfEngine required to use IronPDF for Python?
No. IronPDF for Python is fully self-contained and does not require IronPdfEngine by default. The engine is an optional remote rendering server used in specific distributed or containerized deployment scenarios.
How do I connect IronPDF for Python to a remote IronPdfEngine?
Call Installation.ConnectToIronPdfHost(IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("host:port")) at the start of your application, before any PDF operations. All subsequent IronPDF calls in that process are routed to the remote engine automatically.
What version of IronPdfEngine is compatible with my version of IronPDF for Python?
The version numbers must match exactly. For example, IronPDF for Python 2024.2.2 requires IronPdfEngine 2024.2.2. Cross-version usage is not supported and will prevent a successful connection.
How do I install IronPDF for Python?
Run pip install ironpdf in your Python environment. The package is available on PyPI and includes all components needed for local PDF operations without any additional downloads.
When should I use remote IronPdfEngine instead of local mode?
Remote mode is useful for high-traffic shared PDF services where multiple processes route rendering requests to a single engine, for containerized deployments that need independent scaling, and when isolating CPU-intensive PDF workloads from the main application process.
How do I verify that the remote IronPdfEngine connection is working?
After calling ConnectToIronPdfHost, render a minimal HTML string using ChromePdfRenderer.RenderHtmlAsPdf() and save the result. If the PDF file is created without error, the remote engine is connected and operational.
What port does IronPdfEngine use for gRPC connections?
The default gRPC port is 33350. Ensure this port is open and not blocked by firewall rules on both the application server and the IronPdfEngine host. The port can be specified in the RemoteServer("host:port") connection string.
Where should I place the ConnectToIronPdfHost call in my application?
Place it at the entry point of your application — at the top of main.py or inside your application startup handler — before any code that creates, reads, or edits a PDF document.
How do I run IronPdfEngine as a remote server?
Pull the IronPdfEngine Docker image and run it as a container, exposing the gRPC port. Full instructions are in the how-to guide on pulling and running IronPdfEngine.
Does IronPDF for Python support .NET 10?
IronPDF for Python is a Python-native library and does not depend on .NET. The underlying IronPdfEngine is built on .NET and is fully compatible with .NET 10, 9, 8, and earlier versions.







