HTML to PDF API - PDFCrowd https://pdfcrowd.
com/api/html-to-pdf-api/
pdfcrowd
API › HTML to PDF API
HTML to PDF API
Convert web pages and HTML files to PDF with our
cloud-based API
Documentation
Quick start guide, code examples, installation, and detailed API
reference.
HTTP API PHP Java
.NET Python Node.js
Ruby Golang Command Line
Additional Integration Tutorials
C, C++, Rust, WordPress, PHP Web Server, Postman
Sign up for a free trial
Secure and Reliable
Service reliability and security have been our top priorities
throughout our 15 years of existence.
Contact • Blog • FAQ • About us • Press •
© 2009-2025 Pdfcrowd s.r.o. Legal • Privacy
1 de 4 30/1/25, 12:01
HTML to PDF API - PDFCrowd https://pdfcrowd.com/api/html-to-pdf-api/
Easy Integration
Integration requires only a few lines of code, ensuring a
straightforward and time-saving setup.
Fully Customizable
The API offers extensive customization options to ensure the
conversion meets your specific needs.
HTML to PDF API Features
• Support for modern web standards
The API supports the latest web standards, including HTML5, CSS3,
and JavaScript. This means that you can convert complex web pages
to PDF without losing any of the design. You can be confident that
your PDF will look and feel just like your original web page, including
all the styling, fonts, and images.
• Flexibility in input sources
The API allows you to convert local HTML files, public web pages,
and even HTML code contained within a string or a data stream. This
provides you with the flexibility to choose the most convenient input
source for your needs.
• PDF Page layout control
The API allows you to have control over the page layout of your
PDFs. You can adjust the page size and orientation, margins,
headers, footers, and more to ensure that the PDF matches your
desired layout and style.
• Page break control
The API allows you to force or avoid page breaks at specific points in
your document. This allows you to ensure that your PDF documents
are easy to read and navigate. By strategically placing page breaks,
you can avoid awkward line breaks or widows and orphans, which
can improve the overall readability of your document.
• Content control
You can hide or remove certain HTML elements from the PDF output
or convert only a specific part of a web page to PDF. This provides
2 de 4 30/1/25, 12:01
HTML to PDF API - PDFCrowd https://pdfcrowd.com/api/html-to-pdf-api/
you with greater control over the content that appears in your PDF
documents. For example, you can selectively convert only the main
content of a web page, or remove non-essential content to improve
•
document readability.
Screen and print @media queries
The API supports both screen and print @media queries, which
means you can choose to convert your HTML document using either
the screen style sheet or the print style sheet.
•
Custom CSS styling for PDF output
The API offers the ability to apply custom CSS styling specifically for
the PDF output of your converted web page. This means that you can
control the appearance of your PDF document without affecting the
appearance of the original web page.
• JavaScript on-the-fly injection
The API allows you to inject custom JavaScript code into the
converted web page just before it is printed to PDF. This enables you
to manipulate the HTML document in a variety of ways before it is
converted to PDF such as as adding dynamic content, modifying the
layout, or altering the behavior of specific elements on the web page.
•
HTML templates
The API allows you to provide an HTML template file, along with a
data file in JSON, XML, CSV, or YAML format. The template file can
contain placeholders for data, which are filled in by the data file
before the resulting HTML document is converted to PDF.
•
Fillable PDF forms and signatures
The API supports the conversion of interactive elements such as
forms, buttons, and dropdown menus from your HTML web page into
PDF format. We also support digital signatures. This means that you
can create PDFs that allow users to interact with your content.
Session-based and HTTP Basic authentication
The API can convert convert web pages that are protected by these
• types of authentication. Session-based authentication is based on
cookies, which are used to maintain a user's authentication status as
they navigate between pages on a website. HTTP Basic
authentication, on the other hand, is a simple authentication
mechanism that uses a username and password to authenticate a
user.
Automatic table of contents generation
The API can automatically generate a table of contents for your PDF
output from the headings in your HTML document. You can
3 de 4 30/1/25, 12:01
HTML to PDF API - PDFCrowd https://pdfcrowd.com/api/html-to-pdf-api/
customize the ToC style, formatting, and level of detail to ensure that
it matches your preferences.
Background and foreground watermarks
The API allows you to add a watermark to your PDF output to
maintain your brand identity or to prevent unauthorized distribution
and copying of your content.
PDF password protection and metadata customization
You can protect your PDF output by adding password protection. This
ensures that your PDFs are secure and accessible only to authorized
users. You can also customize metadata such as author name, title,
and subject to ensure your PDF output is easily identifiable.
Convert the mobile or desktop web page version
The API provides you with the flexibility to choose whether to convert
the mobile or desktop version of a web page, ensuring that your PDF
output meets your specific needs.
Readability preprocessing to remove clutter
Our HTML to PDF API offers a readability preprocessing feature that
helps to remove clutter from web pages, resulting in an improved
user experience. By removing unwanted elements such as ads, pop-
ups, and other distractions, the resulting PDF is more focused on the
content, making it easier for users to read and understand.
4 de 4 30/1/25, 12:01