PDFCrowd Blog

Product updates, tips & tricks

A digital signature is a piece of information placed in a PDF document that makes it possible to verify the authenticity of the document. The Pdfcrowd API allows you to programmatically create PDFs containing a digital signature field. Such PDFs can be digitally signed in, for example, Adobe Reader or Preview.

This feature is available starting with Pdfcrowd API client libraries version 5.0.

Quick Start

To add a signature field to a document, set the pdfcrowd-signature class on a DIV element and specify its dimensions.

<div class="pdfcrowd-signature" 
     style="width: 2in; height: 1in; border: 1pt solid black;">
</div>

Our HTML to PDF API will transform this element to a signature field in the resulting PDF.

Postman, a versatile platform for API management, serves as an excellent tool for interacting with the Pdfcrowd Conversion API. This guide provides a comprehensive tutorial on how to use Postman to convert between PDF, HTML, and various image formats using the Pdfcrowd API. Whether you're a developer familiar with Postman or someone exploring API functionalities for document conversion, this guide will walk you through the process step-by-step.

In this tutorial you will learn how to add header and footer to PDF created by Pdfcrowd API. We will use PHP for illustrative purposes, but the code would be essentially the same in all languages the API supports.

Step-by-Step Example

Let's start with instantiating the Pdfcrowd client and setting the page format to Letter:

$client = new \Pdfcrowd\HtmlToPdfClient($user_name, $api_key);
$client->setPageSize('Letter');

The next step is to design our HTML footer and header. We can use special CSS classes that will be expanded as follows:

  • pdfcrowd-page-count - the total page count of printed pages
  • pdfcrowd-page-number - the current page number
  • pdfcrowd-source-url - the source URL of the main document

Overview

The Pdfcrowd API v2 is the new generation of our API. It is not 100% backward compatible but the changes are mostly syntactic and the migration from API v1 should be straightforward.

If you want to switch your current API v1 plan to API v2, please follow these steps:

  1. Activate the free API v2 trial in your account page.
  2. Follow the instructions below and migrate your API v1 implementation to API v2.
  3. If the API v2 works to your satisfaction, choose from our API v2 plans.
  4. If you no longer need the API v1 implementation, you can cancel the API v1 plan.