Native Pdf features
Learn how to add metadata, bookmarks into your pdf without any effort.
Metadata
Pdf metadata refers to information about the document's title, author, keywords, description and other metadata fields.
You can create a Pdf filling these metadata with meta
tags or title
tag.
Metadata
<title>Title of my document</title>
<meta name="keywords" content="keyword_1,keyword_2">
<meta name="author" content="Nicolas Law-dune">
<meta name="description" content="Description of my document">
<meta name="generator" content="My Company name">
Bookmarks
With Pdfless, Pdf bookmarks is automatically generated when you define title tags on your html <h1> <h2> <h3> <h3> <h5> <h6>
.
Bookmarks example
<html>
<body>
<h1>Bookmark example</h1>
<h2>Subtitle h2 - part 1</h2>
<h3>Sub-Subtitle h3 - part 1 - 1</h3>
<h2>Subtitle h2 part 2</h2>
<h3>Sub-Subtitle h3 - part 2 - 1</h3>
<h3>Sub-Subtitle h3 - part 2 - 2</h3>
</body>
</html>
Hyperlinks and anchors
The use of the <a></a>
tag for adding links to external content in your document behaves just like it does in a web browser. You can define hyperlinks with the href attribute to point to external websites, documents, or multimedia resources.
You can use <a></a>
tags as anchors within the PDF document by referencing the IDs of headings or specific elements and this allows you to create internal links. By setting the href attribute to the id of a target element, such as a title or section, you ensure precise navigation to that point.
Links
<html>
<body>
<article id="contents">
<h2>Summary</h2>
<h3>External links</h3>
<ul>
<li><a href="https://pdfless.com">Pdfless</a></li>
<li><a href="https://www.linkedin.com/company/pdfless">Linkedin of website</a></li>
</ul>
<h3>Anchors</h3>
<ul>
<li><a href="#job-offers"></a></li>
<li><a href="#skills"></a></li>
</ul>
</article>
<h1 id="job-offers">Job offers</h1>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<h2 id="skills">Skills requirements</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
</body>
</html>
PDF Protection
This feature is available exclusively with our Essentials or Pro plans. For more details, please refer to our pricing plans.
PDF protection is a crucial feature for securing sensitive information and controlling access to documents. It allows users to apply various security measures, such as password protection, encryption, and permission restrictions, to safeguard their files. With password protection, a document can be locked, requiring a user to enter a password to open it.
- The
User Password
is known as document Open password, which encrypts the file and prevents opening. - The
owner's password
, also referred to as a Permission Password, is used to restrict access to certain functionalities in PDF documents. In Adobe Acrobat, this password is specifically known as the Change Permissions Password.
PDF protection is implemented exclusively during document generation, provided the API is called with the appropriate parameters.
Property name | Required | Default value | Description |
---|---|---|---|
encryption_user_password | Required | N/A | If this parameter is setted, the document will be encrypted |
encryption_owner_password | Optional | user password |
Owner password |
encryption_allow_printing | Optional | true |
This option allows user to print the document |
encryption_allow_modifying | Optional | true |
This option allows user to modify the document |
encryption_allow_modify_annotations | Optional | true |
This option allows user to modify annotations of the document |
encryption_allow_content_copying | Optional | true |
This option allows user to copy the content |
encryption_allow_screenreaders | Optional | true |
This option allows user to copy the content |
encryption_allow_form_filling | Optional | true |
This option allows user to fill the document forms |
encryption_allow_document_assembly | Optional | true |
This option allows user to perform cross-document operations. |
Here is an example with the basics parameters to generate a PDF without protection :
Document generation
{
"template_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"reference_id": "my_ref_id",
"payload": "{\"variable1\": \"value1\"}"
}
If you want to generate the document with protection, add encryption_user_password
parameter.
Document generation with protection
{
"template_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"reference_id": "my_ref_id",
"payload": "{\"variable1\": \"value1\"}",
"encryption_user_password": "my_user_password",
"encryption_owner_password": "my_owner_password"
}
The following example describes how to generate a protected document, preventing user to copy content :
Document generation with protection and specific permissions
{
"template_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"reference_id": "my_ref_id",
"payload": "{\"variable1\": \"value1\"}",
"encryption_user_password": "my_user_password",
"encryption_owner_password": "my_owner_password",
"encryption_allow_content_copying": false
}