Skip to content
This repository was archived by the owner on Aug 29, 2026. It is now read-only.

Latest commit

 

History

History
65 lines (44 loc) · 2.8 KB

File metadata and controls

65 lines (44 loc) · 2.8 KB

IronPdfPython.Examples

Runnable Python examples for IronPDF for Python, a PDF library that converts HTML to PDF with a real Chromium renderer and generates, edits, and extracts PDF content.

Install

pip install ironpdf

Quickstart

from ironpdf import *

License.LicenseKey = "YOUR-LICENSE-KEY"

renderer = ChromePdfRenderer()
pdf = renderer.RenderHtmlAsPdf("<h1>Hello, PDF!</h1>")
pdf.SaveAs("hello.pdf")

To render from other sources, swap RenderHtmlAsPdf for RenderUrlAsPdf(url) or RenderHtmlFileAsPdf(path), and use PdfDocument.FromFile(path) to open a document that already exists.

IronPDF for Python wraps the .NET library, so members keep their .NET PascalCase namesSaveAs, not save_as. A snake_case attribute is a sign the call is wrong. Logger.EnableDebugging = True together with Logger.LogFilePath turns on engine logging when something needs diagnosing.

Without a license key, generated PDFs include a watermark.

What's in this repo

Each folder contains a self-contained project with a requirements.txt. Run pip install -r requirements.txt, then python program.py:

  • examples/ — focused snippets demonstrating individual features
  • get-started/ — first projects covering license keys and remote IronPdfEngine
  • how-to/ — task-oriented guides for specific PDF operations
  • quickstart/ — an end-to-end project scaffold with tests
  • tutorials/ — a longer HTML-to-PDF walkthrough

Common tasks covered

  • HTML string, HTML file, URL, and image to PDF conversion
  • Merging and splitting existing PDFs
  • Digital signatures and document security
  • Form filling and form data extraction
  • Rasterizing pages to images
  • Compression and file-size reduction
  • Multi-frame TIFF conversion, embedded Base64 images, and barcodes
  • Printing to a physical printer
  • Running against a remote IronPdfEngine

Platform support

Python 3.7 and above. Windows, macOS, and Linux. See the documentation for environment-specific notes.

Documentation and support

About

This repository is maintained by Iron Software. IronPDF for Python is a commercial library — see licensing for terms and trial details.