Skip to content

Commit fd7478f

Browse files
committed
Regenerate documentation
1 parent 3882f29 commit fd7478f

File tree

37 files changed

+1863
-2
lines changed

37 files changed

+1863
-2
lines changed

README.md

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,116 @@
1-
# IronPdfPython.Examples
2-
Documentation and code examples for IronPDF for Python (ironpdf.com/python/)
1+
<img src="https://pypi-camo.freetls.fastly.net/e93654975820d9a4678ae37c24d583530e47f6d1/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f49726f6e5064663f636f6c6f723d696e666f726d6174696f6e616c266c6162656c3d6c6174657374" alt=Pypi><img src="https://pypi-camo.freetls.fastly.net/eb346360f499a56558971980171a3316cfc6c379/68747470733a2f2f696d672e736869656c64732e696f2f707970692f646d2f49726f6e5064663f636f6c6f723d696e666f726d6174696f6e616c266c6162656c3d696e7374616c6c73266c6f676f3d70797069" alt=Installs><img src="https://pypi-camo.freetls.fastly.net/5712aa19f02c7ac5b7c0a63f792d30d6db1f6fa4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d25323025453225394325393325323033313538253230746573747325323070617373656425323028302532306661696c6564292532302d3130374331303f6c6f676f3d76697375616c73747564696f" alt=Passed><img src="https://pypi-camo.freetls.fastly.net/a8bc218f0bc083e54c17f9b1868c423494ed3a15/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322538302538452532302d2532302545322539432539332d3130374331303f6c6f676f3d77696e646f7773" alt=windows><img src="https://pypi-camo.freetls.fastly.net/f9d68eddda84fe60f2540297abfff724b3d6fd42/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322538302538452532302d2532302545322539432539332d3130374331303f6c6f676f3d6170706c65" alt=macOS><img src="https://pypi-camo.freetls.fastly.net/13779d97888fdb36625402a4212f5ce4e631131b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322538302538452532302d2532302545322539432539332d3130374331303f6c6f676f3d6c696e7578266c6f676f436f6c6f723d7768697465" alt=linux><img src="https://pypi-camo.freetls.fastly.net/9f625e7bcadccd3ec075651b9b9e52b196535df1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322538302538452532302d2532302545322539432539332d3130374331303f6c6f676f3d646f636b6572266c6f676f436f6c6f723d7768697465" alt=docker><img src="https://pypi-camo.freetls.fastly.net/3a4ab624c52420f7033cf0bd2eb3fc1b80abba0c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322538302538452532302d2532302545322539432539332d3130374331303f6c6f676f3d616d617a6f6e617773" alt=aws><img src="https://pypi-camo.freetls.fastly.net/4bf4e07fd8d63fa3a42828a692a26a5bfc8921fa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322538302538452532302d2532302545322539432539332d3130374331303f6c6f676f3d6d6963726f736f6674617a757265" alt=microsoftazure><a href="https://ironpdf.com/python/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=topshield#helpscout-support" rel=nofollow><img src="https://pypi-camo.freetls.fastly.net/ceba64b720b8f25eb766215926b1e82b4d79ee28/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c697665253230436861743a2d32342f352d707572706c653f6c6f676f3d676f6f676c6563686174266c6f676f436f6c6f723d7768697465" alt=livechat></a>
2+
3+
# IronPDF - Manage PDF Documents in Python Projects
4+
5+
Explore a powerful tool, IronPDF, a creation from Iron Software, enabling developers to create, modify, and read PDF files directly within Python applications.
6+
7+
IronPDF offers key functionalities including:
8+
9+
- PDF creation from diverse sources like [HTML](https://ironpdf.com/python/examples/using-html-to-create-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [URLs](https://ironpdf.com/python/examples/converting-a-url-to-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [JavaScript](https://ironpdf.com/python/examples/javascript-html-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [CSS](https://ironpdf.com/python/tutorials/html-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), and various [image formats](https://ironpdf.com/python/examples/image-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist).
10+
- Enhancements such as adding [headers and footers](https://ironpdf.com/python/examples/headers-and-footers/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [digital signatures](https://ironpdf.com/python/examples/digitally-sign-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [attachments](https://ironpdf.com/python/examples/add-attachment-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), and implementing [passwords and security measures](https://ironpdf.com/python/examples/security-and-metadata/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist).
11+
- Advanced capabilities including comprehensive Multithreading and [Asynchronous support](https://ironpdf.com/python/examples/async/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist).
12+
- Visit [our homepage](https://ironpdf.com/python/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist) to explore all the [available code examples](https://ironpdf.com/python/examples/using-html-to-create-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist) and discover over 50 features that enrich your PDF handling tasks.
13+
14+
### Compatibility Across Various Platforms
15+
16+
IronPDF is fully compatible and can be integrated into environments using:
17+
18+
- Python 3.7 and newer versions
19+
- Supports operational systems like Windows, macOS, Linux, along with deployments in Docker, Azure, and AWS environments.
20+
21+
Discover more on platform integration with [IronPDF Cross Platform Compatibility Support Image](https://pypi-camo.freetls.fastly.net/21d6a7aaa479cdbd6a449938ae9bb55b14826dd6/68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f69726f6e2d736f6674776172652f69726f6e2d6e756765742d6173736574732f6d61696e2f49726f6e5044462d707974686f6e2d726561646d652f63726f73732d706c6174666f726d2d636f6d7061746962696c6974792e706e67).
22+
23+
Additionally, accessing our comprehensive [API reference, licensing details, and more](https://ironpdf.com/python/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist#trial-license) is straightforward via our official site.
24+
25+
<a href="https://ironpdf.com/python/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=topbanner#trial-license" rel=nofollow>![IronPDF NuGet Trial Banner Image](https://pypi-camo.freetls.fastly.net/08ad7c76dea13dc8d5929fe3f278cd212428d771/68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f69726f6e2d736f6674776172652f69726f6e2d6e756765742d6173736574732f6d61696e2f49726f6e5044462d707974686f6e2d726561646d652f6e756765742d747269616c2d62616e6e65722d6c617267652e706e67)</a>
26+
<a href="https://ironpdf.com/python/docs/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=navigation" rel=nofollow>Get Started</a> <a href="https://ironpdf.com/python/tutorials/html-to-pdf/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=navigation" rel=nofollow>Tutorials</a> <a href="https://ironpdf.com/python/examples/using-html-to-create-a-pdf/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=navigation" rel=nofollow>Code Examples</a> <a href="https://ironpdf.com/python/licensing/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=navigation" rel=nofollow>Licensing</a> <a href="https://ironpdf.com/python/docs/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=navigation#trial-license" rel=nofollow>Free Trial</a>
27+
28+
IronPDF is a toolkit produced and supported by Iron Software, designed to assist engineers in generating, modifying, and retrieving PDF content within Python projects.
29+
30+
### IronPDF excels at:
31+
32+
* Creating PDF files from various sources including: [HTML](https://ironpdf.com/python/examples/using-html-to-create-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [URLs](https://ironpdf.com/python/examples/converting-a-url-to-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [JavaScript](https://ironpdf.com/python/examples/javascript-html-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [CSS](https://ironpdf.com/python/tutorials/html-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), and various [image formats](https://ironpdf.com/python/examples/image-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist).
33+
* Enhancing PDFs with [headers and footers](https://ironpdf.com/python/examples/headers-and-footers/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [digital signatures](https://ironpdf.com/python/examples/digitally-sign-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), [attachments](https://ironpdf.com/python/examples/add-attachment-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist), and robust [security features including password protection](https://ironpdf.com/python/examples/security-and-metadata/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist).
34+
* Optimizing performance through comprehensive Multithreading and [asynchronous processing](https://ironpdf.com/python/examples/async/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist).
35+
* For an expansive view of our capabilities, visit [our features page](https://ironpdf.com/python/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist). Here, you will find an extensive range of [code examples](https://ironpdf.com/python/examples/using-html-to-create-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist) and details on all our features, totaling over 50 options available for your PDF manipulation needs.
36+
37+
### Cross-Platform Compatibility of IronPDF:
38+
39+
- Compatible with Python 3.7 and newer versions
40+
- Supports multiple operating systems and environments including Windows, macOS, Linux
41+
- Fully operational on Docker, Microsoft Azure, and Amazon Web Services (AWS)
42+
43+
<a href="https://ironpdf.com/python/docs/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=crossplatformbanner" rel=nofollow>![IronPDF Cross Platform Compatibility Support Image](https://pypi-camo.freetls.fastly.net/21d6a7aaa479cdbd6a449938ae9bb55b14826dd6/68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f69726f6e2d736f6674776172652f69726f6e2d6e756765742d6173736574732f6d61696e2f49726f6e5044462d707974686f6e2d726561646d652f63726f73732d706c6174666f726d2d636f6d7061746962696c6974792e706e67)</a>
44+
45+
Furthermore, you can easily access our comprehensive API documentation and [complete licensing details](https://ironpdf.com/python/licensing/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist#trial-license) directly from our website.
46+
47+
## How to Use IronPDF
48+
49+
IronPDF for Python depends on .NET 6.0 for its core functionalities. To effectively use IronPDF for Python, it's imperative that your system has [the .NET 6.0 runtime](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) installed.
50+
51+
Users of Linux and macOS should ensure they install .NET from [this link](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) before attempting to use the IronPDF Python library.
52+
```
53+
54+
### Installation via Pip
55+
56+
```bash
57+
pip install ironpdf
58+
```
59+
60+
Upon its initial execution, IronPDF will automatically fetch any required additional dependencies.
61+
62+
### Alternative Download Method
63+
64+
Should you prefer, you can directly download the Python package tailored to your operating system. Visit our download area at <a href="https://ironpdf.com/python/" rel=nofollow>https://ironpdf.com/python/</a> to access the specific packages.
65+
66+
### Using IronPDF
67+
68+
After installing the package, start by incorporating `from IronPyPdf import *` at the beginning of your Python code. Below is a quick guide on converting HTML to a PDF to help you get up and running:
69+
70+
```python
71+
# Convert HTML to PDF
72+
from ironpdf import *
73+
renderer = ChromePdfRenderer()
74+
pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>")
75+
pdf.SaveAs("output.pdf")
76+
```
77+
78+
Additionally, you can convert webpages directly to PDF using:
79+
80+
```python
81+
# Convert URL to PDF
82+
from ironpdf import *
83+
renderer = ChromePdfRenderer()
84+
pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/python/")
85+
pdf.SaveAs("output.pdf")
86+
```
87+
88+
Here is the paraphrased section:
89+
90+
---
91+
## Table of Capabilities
92+
93+
Explore the vast array of features offered by IronPDF by visiting our detailed features chart here: [IronPDF Features Overview](https://ironpdf.com/python/features/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featuresbanner). The chart is visually represented to provide an easy understanding of all functionalities available to enhance your application’s PDF capabilities.
94+
95+
![IronPDF Feature Set](https://ironpdf.com/python/assets/ironpdf-python-features-table.png)
96+
97+
---
98+
99+
<a href="https://ironpdf.com/python/features/?utm\_source=nuget&utm\_medium=organic&utm\_campaign=readme&utm\_content=featuresbanner" rel=nofollow>![IronPDF Features](https://pypi-camo.freetls.fastly.net/dca78f0ed80659078b7c16a6828c7d256b109eac/68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f69726f6e2d736f6674776172652f69726f6e2d6e756765742d6173736574732f6d61696e2f49726f6e5044462d707974686f6e2d726561646d652f66656174757265732d7461626c652e706e67)</a>
100+
101+
## Available Licensing and Support
102+
103+
Explore our comprehensive resources including code samples, in-depth tutorials, information on licensing, and additional documentation by visiting our site: [IronPDF Python Section](https://ironpdf.com/python/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=supportanddocs).
104+
105+
Should you need further assistance or have queries, feel free to reach out to us via email at: [[email protected]](mailto:[email protected]).
106+
107+
Here's the paraphrased section of the article:
108+
109+
-----
110+
## Helpful Resources and Documentation
111+
112+
- **Code Examples**: Explore a variety of code samples demonstrating diverse functionalities at [IronPDF Code Examples](https://ironpdf.com/python/examples/using-html-to-create-a-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=featureslist).
113+
- **Tutorials**: Learn through step-by-step guides available at [IronPDF Tutorials](https://ironpdf.com/tutorials/html-to-pdf/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=supportanddocs).
114+
- **Licensing Information**: Find comprehensive licensing details at [IronPDF Licensing](https://ironpdf.com/python/licensing/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=supportanddocs).
115+
- **Live Chat Support**: For immediate assistance, start a conversation with our support team through [IronPDF Live Chat Support](https://ironpdf.com/python/?utm_source=nuget&utm_medium=organic&utm_campaign=readme&utm_content=supportanddocs#helpscout-support).
116+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from ironpdf import *
2+
3+
# Instantiate Renderer
4+
renderer = ChromePdfRenderer()
5+
renderer.RenderingOptions.WaitFor.RenderDelay(500)
6+
7+
# Load barcode via HTML
8+
barcode_html = '''<link href="https://fonts.googleapis.com/css?family=Libre%20Barcode%20128" rel="stylesheet">
9+
<p style="font-family: 'Libre Barcode 128', serif; font-size:30px;">Hello Google Fonts</p>'''
10+
doc = renderer.RenderHtmlAsPdf(barcode_html)
11+
12+
# or use the BarcodeStamper
13+
barcode_stamp = BarcodeStamper("Hello World", BarcodeEncoding.Code39)
14+
doc.ApplyStamp(barcode_stamp)
15+
16+
# Export to a file or Stream
17+
doc.SaveAs("bc-test.pdf")
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
***Based on <https://ironpdf.com/examples/barcode-htmltopdf/>***
2+
3+
Python developers have two main options to integrate barcodes into their PDFs using IronPDF for Python, as described below:
4+
5+
## Method 1: Embedding Barcodes with the `ChromePdfRenderer`
6+
7+
This method allows the inclusion of textual information within barcodes:
8+
9+
1. Define a string variable that includes the necessary HTML:
10+
- A `link` element that points to a barcode font such as [this one](https://fonts.google.com/specimen/Libre+Barcode+128).
11+
- An element that contains the text you wish to convert into a barcode.
12+
2. Instantiate a new `ChromePdfRender` object.
13+
3. Execute the `RenderHtmlAsPdf` method on this object, passing in the previously defined string.
14+
4. Save the generated `PdfDocument` object to a file.
15+
16+
## Method 2: Implementing Barcodes with the `BarcodeStamper`
17+
18+
This method offers enhanced customization for barcode properties such as dimensions and placement:
19+
20+
1. Begin by creating a `PdfDocument` object, either from an existing PDF or from HTML, as demonstrated below.
21+
22+
```python
23+
# Load an existing PDF file
24+
existing_pdf = PdfDocument("existing.pdf")
25+
26+
# Generate a PDF from HTML
27+
new_pdf = ChromePdfRenderer().RenderHtmlAsPdf("<h1>Hello world!</h1>")
28+
```
29+
30+
2. Initialize a `BarcodeStamper` object, specifying the barcode text and the desired barcode format. You may also set properties like width and height.
31+
3. Use the `applyStamp` method to insert the barcode onto the `PdfDocument`.
32+
4. Write the updated PDF to disk.
33+
34+
For greater flexibility with barcode creation, consider utilizing the [IronBarcode C# Library](https://ironsoftware.com/csharp/barcode/).
35+
*(Incorporate these barcodes in PDF files via IronPDF for Python's [HtmlStamper](https://ironpdf.com/python/examples/stamping-new-content/) feature.)*
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from ironpdf import *
2+
3+
# Instantiate Renderer
4+
renderer = ChromePdfRenderer()
5+
6+
# Create a PDF from a URL or local file path
7+
pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/")
8+
9+
# Export to a file or Stream
10+
pdf.SaveAs("url.pdf")
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
***Based on <https://ironpdf.com/examples/converting-a-url-to-a-pdf/>***
2+
3+
IronPDF for Python offers the functionality to convert web pages into PDF documents.
4+
5+
The following Java code snippet illustrates the usage of the `RenderUrlAsPdf` method. This method yields a `PdfDocument` object, which can subsequently be stored using the `saveAs` method.
6+
7+
The `renderUrlAsPdf` method requires a string parameter representing a fully qualified URL. IronPDF fetches the HTML content from the specified URL via an HTTP request and converts it into a PDF. If accessing a secured website, developers can pass a `ChromeHttpLoginCredentials` object as an optional parameter to provide authentication details. For more insights into this class, consult the API Reference.
8+
9+
This feature is an excellent tool for Java developers to download PDFs from URLs.
10+
11+
For a visual guide, watch [this YouTube video](https://youtu.be/1yIlV74P3Ok).
12+
13+
Additionally, you can explore the `ChromePdfRenderOptions` on the [API Reference page](https://ironpdf.com/java/object-reference/api/com/ironsoftware/ironpdf/render/ChromePdfRenderOptions.html) to learn about customizing the appearance of PDFs during their transformation from HTML.

0 commit comments

Comments
 (0)