---
canonical_url: "https://docs.composio.dev/toolkits/pdf_munk"
markdown_url: "https://docs.composio.dev/toolkits/pdf_munk.md"
product: "platform"
version: null
last_updated: null
---

# PDF Munk

PDF Munk provides APIs for generating, converting, editing, securing, and extracting content from PDFs and images.

- **Category:** documents
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 9
- **Triggers:** 0
- **Slug:** `PDF_MUNK`
- **Version:** 00000000_00

## Tools

### Convert Images to PDF

**Slug:** `PDF_MUNK_CONVERT_IMAGES_TO_PDF`

Combine one or more public images into a temporary hosted PDF in the supplied order, returning expiration metadata when available.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `image_urls` | array | Yes | Image URLs to place into the PDF in order. |
| `output_filename` | string | No | Optional filename for the generated PDF. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert PDF to Images

**Slug:** `PDF_MUNK_CONVERT_PDF_TO_IMAGES`

Convert selected pages of a public PDF into temporary hosted PNG, JPEG, or WebP images.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `dpi` | integer | No | Rendering resolution in dots per inch. |
| `url` | string | Yes | Public URL of the PDF to convert. |
| `page` | integer | No | One page to convert; omit when using pages. |
| `pages` | string | No | Page range or list such as 1-3,5; do not provide page at the same time. |
| `quality` | integer | No | Requested image quality from 1 to 100. |
| `image_format` | string ("png" | "jpg" | "jpeg" | "webp") | No | Image format for converted pages. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Image

**Slug:** `PDF_MUNK_GENERATE_IMAGE`

Generate a temporary hosted PNG image from a public webpage URL or raw HTML, returning its scheduled deletion date.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | Public webpage URL to capture; leave html_content unset when using this source. |
| `font` | string | No | Google Font names separated by &#124;. |
| `width` | integer | No | Output image width in pixels; the account entitlement may cap it. |
| `height` | integer | No | Output image height in pixels; the account entitlement may cap it. |
| `quality` | integer | No | Requested output quality from 30 to 100. |
| `full_page` | boolean | No | Capture the full scrollable page instead of only the viewport. |
| `wait_until` | string ("load" | "domcontentloaded" | "networkidle") | No | Page lifecycle event to wait for before capture. |
| `css_content` | string | No | Optional CSS applied while rendering. |
| `html_content` | string | No | Raw HTML to render; leave url unset when using this source. |
| `template_variables` | object | No | Values that replace {{key}} tokens in HTML, such as {{name}} with {'name': 'Ada'}. |
| `device_scale_factor` | number | No | Device pixel ratio used for rendering. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate PDF

**Slug:** `PDF_MUNK_GENERATE_PDF`

Generate a hosted PDF from either a public webpage URL or raw HTML, with practical page and rendering controls. The operation consumes PDF generation quota and returns a temporary hosted URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | Public webpage URL to render; leave html_content unset when using this source. |
| `font` | string | No | Google Font names separated by &#124;. |
| `full_page` | boolean | No | For URL input, render the full scrollable page. |
| `landscape` | boolean | No | Render pages in landscape orientation. |
| `max_pages` | integer | No | Maximum number of pages to render (1-20; entitlement may impose a lower limit). |
| `paper_size` | string ("A4" | "A3" | "A5" | "Letter" | "Legal" | "Tabloid") | No | Output paper size. |
| `css_content` | string | No | Optional CSS applied to the supplied HTML or webpage. |
| `html_content` | string | No | Raw HTML to render; leave url unset when using this source. |
| `viewport_width` | integer | No | Browser viewport width in pixels. |
| `viewport_height` | integer | No | Browser viewport height in pixels. |
| `print_background` | boolean | No | Include CSS backgrounds in the PDF. |
| `template_variables` | object | No | Values that replace {{key}} tokens in HTML, such as {{customer_name}} with {'customer_name': 'Ada Lovelace'}. |
| `prefer_css_page_size` | boolean | No | Prefer CSS @page sizing over paper_size. |
| `display_header_footer` | boolean | No | Display the page header and footer. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Merge PDFs

**Slug:** `PDF_MUNK_MERGE_PDFS`

Merge two to fifteen publicly accessible PDFs in the supplied order and return a temporary hosted PDF URL with its deletion date when available.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | array | Yes | Public PDF URLs to merge in order, from first page group to last. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### OCR Image

**Slug:** `PDF_MUNK_OCR_IMAGE`

Extract text and line-level OCR results from an image available at a public URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `language` | string | No | Tesseract language code or combination, such as eng or eng+hin. |
| `image_url` | string | Yes | Public URL of the image to process. |
| `ocr_engine_mode` | integer ("0" | "1" | "2" | "3") | No | Tesseract OCR engine mode from 0 to 3; use 3 to let Tesseract select the available engine. |
| `page_segmentation_mode` | integer ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13") | No | Tesseract page segmentation mode from 0 to 13; use 3 for automatic layout detection or 6 for one uniform text block. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### OCR PDF

**Slug:** `PDF_MUNK_OCR_PDF`

Extract text from a scanned PDF available at a public URL using OCR controls.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `dpi` | integer | No | Rasterization DPI used before OCR. |
| `url` | string | Yes | Public URL of the scanned PDF to process. |
| `pages` | string | No | Pages to process: all, ranges, or a list such as 1,3,5-7. |
| `language` | string | No | Tesseract language code or combination, such as eng or eng+hin. |
| `ocr_engine_mode` | integer ("0" | "1" | "2" | "3") | No | Tesseract OCR engine mode from 0 to 3; use 3 to let Tesseract select the available engine. |
| `page_segmentation_mode` | integer ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13") | No | Tesseract page segmentation mode from 0 to 13; use 3 for automatic layout detection or 6 for one uniform text block. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Parse PDF

**Slug:** `PDF_MUNK_PARSE_PDF`

Extract text, layout blocks, tables, or full structured content from a PDF available at a public URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Public URL of the PDF to parse. |
| `mode` | string ("text" | "layout" | "tables" | "full") | No | Extraction detail to return. |
| `pages` | string | No | Pages to parse: all, one page number, or a range such as 1-3. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Watermark File

**Slug:** `PDF_MUNK_WATERMARK_FILE`

Add a text watermark to a PDF or image at a public URL and return a temporary hosted result URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | Text to place as the watermark. |
| `angle` | integer | No | Watermark rotation angle in degrees. |
| `opacity` | number | No | Watermark opacity from transparent (0) to opaque (1). |
| `file_url` | string | Yes | Public URL of the PDF or image to watermark. |
| `font_size` | integer | No | Watermark font size. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
