> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pdf.co/llms.txt
> Use this file to discover all available pages before exploring further.

# General

> This section contains general information about PDF.co functionality and features that span multiple categories.

export const CTAButton = ({href, text, download}) => {
  return <a href={href} download={download} target="_blank" rel="noopener noreferrer" className="text-[20px] font-medium p-5 bg-[#ff4848] text-white rounded-[5px] block w-fit mb-4">
      <span>{text}</span>
    </a>;
};

## How to Avoid Error When URL to Image for Adding into PDF is Empty

You’re trying to add an image into a PDF, but sometimes the image URL is **optional** or **missing**. This can cause your workflow to break unexpectedly.

### Why This Happens

PDF.co requires a valid image URL when inserting an image into a PDF. If the URL is **empty** or null, it throws an error. This usually happens in workflows where image input is optional—for example, generating certificates or forms that may or may not include a photo or logo.

### How to Handle Missing Image URLs

To avoid the error, follow these two steps:

1. **Check If the Image Is Required**
   Before sending the image to PDF.co, add a check to see whether the image input is present or necessary.

2. **Use a Transparent Placeholder**

If the image is **not required** or **empty**, replace the URL with a placeholder image:

```
data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
```

This is a **1x1 pixel transparent image** that ensures the PDF generation continues smoothly without visual impact.

### Platform-Specific Related Resources

**Integromat/Make:**

Use built-in [conditional functions](https://www.integromat.com/en/help/general-functions) to dynamically insert the placeholder when the original image URL is missing.

### Helpful Tips

* Always validate optional file inputs before passing them to PDF.co.
* Use placeholders for any optional image field to ensure uninterrupted PDF creation.
* Placeholder images are ideal for forms, certificates, or dynamic templates.

# Custom Fonts

## How Can I Use Custom Fonts with PDF.co?

If you're aiming to use a specific font in your PDF output and it's not among the default options, here's how you can incorporate custom fonts into your [PDF.co](http://PDF.co) workflows.​

### Supported Methods for Custom Fonts

[PDF.co](http://PDF.co) supports the use of custom fonts through the [**<u>HTML to PDF</u>**](https://docs.pdf.co/api-reference/pdf-from-html/convert) and [**<u>HTML Template to PDF</u>**](https://docs.pdf.co/api/pdf-from-html-template/index.html) APIs. There are two primary methods to include custom fonts:

1. **Google Fonts Integration**\
   Utilize fonts available on[<u>Google Fonts</u>](https://fonts.google.com/) . Include them in your HTML using the standard @import or \<link> methods.
2. **Embedding Fonts via CSS**\
   Host your custom font files (e.g., .ttf, .woff) on a server and reference them in your HTML using @font-face in your CSS. For guidance, refer to this[<u>StackOverflow discussion</u>](https://stackoverflow.com/questions/24990554/how-to-include-a-font-ttf-using-css) .

***Note:***\_ Due to security and licensing considerations, [**PDF.co**](http://PDF.co) cannot host third-party fonts on its servers.\_

### Steps to Implement Custom Fonts

1. **Prepare Your HTML Template**\
   Incorporate the desired font using one of the methods above.
2. **Use the HTML to PDF API**\
   Send your HTML content to [PDF.co](http://PDF.co)'s HTML to PDF API endpoint.
3. **Verify the Output**\
   Ensure the generated PDF reflects the custom font as intended.

### Additional Considerations

* **Font Licensing**: Ensure you have the appropriate rights to use and distribute the custom fonts in your documents.​
* **Font Hosting**: For optimal performance and reliability, host your custom fonts on a stable and accessible server.

## Fonts available for PDF Filling and Adding Text to PDF with pdf/edit/add

**PDF.co Font List**

```javascript theme={null}
Arial
Arial Black
Bahnschrift
Calibri
Cambria
Cambria Math
Candara
Comic Sans MS
Consolas
Constantia
Corbel
Courier New
Ebrima
Franklin Gothic Medium
Gabriola
Gadugi
Georgia
HoloLens MDL2 Assets
Impact
Ink Free
Javanese Text
Leelawadee UI
Lucida Console
Lucida Sans Unicode
Malgun Gothic
Marlett
Microsoft Himalaya
Microsoft JhengHei
Microsoft New Tai Lue
Microsoft PhagsPa
Microsoft Sans Serif
Microsoft Tai Le
Microsoft YaHei
Microsoft Yi Baiti
MingLiU-ExtB
Mongolian Baiti
MS Gothic
MV Boli
Myanmar Text
Nirmala UI
Palatino Linotype
Segoe MDL2 Assets
Segoe Print
Segoe Script
Segoe UI
Segoe UI Historic
Segoe UI Emoji
Segoe UI Symbol
SimSun
Sitka
Sylfaen
Symbol
Tahoma
Times New Roman
Trebuchet MS
Verdana
Webdings
Wingdings
Yu Gothic
```

**Japanese Fonts**

```javascript theme={null}
MS Gothic
MS Mincho
Yu Gothic
```

**Chinese Fonts**

```javascript theme={null}
SimSun
MingLiU
Microsoft YaHei
```

**Korean Fonts**

```javascript theme={null}
Malgun Gothic
```

**Hebrew Fonts**

```javascript theme={null}
Miriam
```

**Arabic Fonts**

```javascript theme={null}
Aldhabi
Andalus
Arabic Typesetting
```

# Output File Access & Expiration

## Where can I find the PDF.co output in Zapier?

The PDF.co output is temporary and expires after an hour by default. The expiration can be extended in the Business plan.

We recommend that you add a third step in your Zap to save the PDF output to a permanent cloud storage such as Google Drive, Dropbox, or similar.

Here's a step-by-step guide on how to set it up. It starts at Step 6: [https://pdf.co/make-pdf-searchable-and-upload-in-google-drive#6](https://pdf.co/make-pdf-searchable-and-upload-in-google-drive#6).

If you'd like to review the generated output, please check out Step 5 here: [https://pdf.co/make-pdf-searchable-and-upload-in-google-drive#5](https://pdf.co/make-pdf-searchable-and-upload-in-google-drive#5).

## Who can access the `pdf-temp-files`, and how long are files stored?

The `pdf-temp-files` storage is a private Amazon S3 bucket that utilizes strong industry-standard encryption at rest. Uploaded and output files are temporarily stored in this bucket under highly randomized names generated using a secure random generator. Each file is set to expire in `60` minutes by default and is automatically deleted permanently from the bucket upon expiration. Depending on your subscription plan, you may increase the expiration timeout from `5` minutes to `1440` minutes (1,440 minutes = 24 hours) using the `expiration` parameter. You may also remove a file directly using the `file/delete` endpoint at any time.

Since the `pdf-temp-files` storage is a private bucket, files are accessed via a special "signed" link using the Amazon AWS powered signed links mechanism. This mechanism provides an additional layer of security when accessing the file.

The `pdf-temp-files` bucket is not included in any backups. Only our engineers have temporary access to this bucket, and 2FA is enforced and required for access. Each access session to the storage is automatically logged, and information about the files' relation to a specific user is stored separately in a different database.

For additional encryption of the file content, you may utilize user-controlled encryption. This feature provides a way to encrypt output file content with your own encryption option using industry-standard AES encryption, which is supported by all platforms, including Salesforce and others.

## How to increase output link expiration

The output link expires in 1 hour by default. This can be extended up to 24 hours in Business 2 and Business 3 plans. For more information, please visit the [Subscription page](https://app.pdf.co/subscriptions).

To extend the output link expiration, please add the expiration parameter in your code with value set in minutes. Setting the expiration value to 1440 will generate an output link that expires after 24 hours.

```javascript theme={null}
{
    "expiration": 1440
}
```

### How to change output link expiration on Zapier

On [Zapier](/integrations/zapier), please open your PDF.co action setup and look for the Output links expiration field. The default value is 60 minutes. You can change the value up to 1440 minutes.

### How to change output link expiration on Make

On [Make](/integrations/make), please open your PDF.co module and look for the Output links expiration field. The default value is 60 minutes. You can change the value up to 1440 minutes.

## I Want to White Label the Output Download Link

You’re trying to create a **custom or permanent download link** instead of using the default PDF.co link—which appears temporary or random-looking.

### Why This Happens

PDF.co-generated output links are **temporary** and use **randomized filenames** for **security and privacy reasons**. This ensures that output files are not publicly accessible indefinitely or guessable via predictable URLs.

### How to Create a Permanent (White-Labeled) Link

To make the download link **permanent** and branded (white-labeled), you need to store the output in your **own cloud storage**, such as **Google Drive** or **Dropbox**.

Here’s how you can do it in two steps:

1. Generate the Output File

* Use any PDF.co module (e.g., convert, generate, edit) to create your file.
* This will give you a **temporary PDF.co URL**.

2. Store the Output File in Cloud Storage

* Add a **Google Drive** or **Dropbox** step right after the PDF.co step in your workflow (e.g., in Zapier or Make).
* Use the **output URL from PDF.co** as the **source file**.
* The file will be stored in your own storage with a **permanent or branded link**.

### Example: Upload to Google Drive Using Zapier

After generating a PDF using PDF.co:

* Add a **Google Drive** action: “Upload File.”
* Set the file source to the PDF.co output URL.
* Choose the desired folder and filename.
* The uploaded file will now have a shareable, white-labeled link hosted under your Drive.

**Try it here:** [How to Upload File to Google Drive Using Zapier](https://pdf.co/how-to-upload-file-to-google-drive-using-zapier)

### Helpful Tips

* Use your own storage to control link branding and expiration.
* Always select the PDF.co output URL as the input when transferring to storage.
* Check file-sharing settings in your storage provider to make the link public or restricted as needed.

# [Background Job Check](/api-reference/job-check)

## How to Run a [Background Job](/api-reference/job-check) ([Async Mode](/api-reference/async-and-sync-mode))

Need to process large files or long-running tasks? Use **async mode** to run the job in the background.

### [Why Use Async Mode?](/api-reference/async-and-sync-mode)

* Required for files or tasks that take more than **30 seconds**
* Handles large files (processing time up to **45 minutes**)
* Prevents **timeout errors**

### How It Works

When you set `async: true`, the API:

* Starts a **background job**
* Immediately returns a **jobId**
* You check the job’s status until it’s done
* You download the file from the provided URL once completed

### Step-by-Step Guide

1. [Enable Async Mode](/api-reference/async-and-sync-mode)

Add the `async: true` parameter in your API call.

**Example**:

```json theme={null}
{
  "url": "https://example.com/file.pdf",
  "async": true
}
```

2. [Get the jobId](/api-reference/job-check)

The API response includes:

```json theme={null}
{
  "jobId": "abcd1234",
  "url": "https://pdf.co/download/..."
}
```

Save the **jobId** for the next step.

3. [Check Job Status](/api-reference/job-check)

Call `/job/check` with the jobId:

```json theme={null}
{
  "jobid": "abcd1234"
}
```

Repeat until the status = "success".

Recommended check intervals:

* **1–2 seconds** for small files
* **10–15 seconds** for large files

**Example status response:**

```json theme={null}
{
  "status": "success"
}
```

4. Download the file

Once **status = "success"**, use the URL from the first response to download the result.

### Helpful Tips

* Always use **async mode** for large PDFs or complex operations
* Avoid checking too frequently on big files → space checks by **10–15 seconds**
