mergepdf logo

mergepdf

Published January 2026
   •    Updated this week

Plugin details

PDF Crop Plugin - User Documentation Overview
The PDF Crop plugin allows you to generate PDF files from HTML elements in your Bubble application with advanced cropping, padding, and margin controls. This plugin is particularly useful when you need to export specific portions of your page to PDF format.
Action: PDF Crop
Purpose
Captures a specific HTML element (or a cropped region of it) and converts it to a downloadable PDF file with customizable page dimensions, margins, and padding.

Parameters
Required Parameters
element_id (Text)

Description: The ID of the HTML element you want to convert to PDF
Type: Static text
Example: "my-invoice-container"
How to use: Set the HTML ID attribute on your Bubble element (using the "id attribute" field in the element's property editor)

file_name (Text)

Description: Name for the downloaded PDF file
Type: Static text
Default: "download.pdf"
Example: "Invoice_2024.pdf"
Note: The .pdf extension will be added automatically if not included


Page Dimensions (Optional)
page_width_mm (Number)

Description: Custom page width in millimeters
Type: Static number
Default: 210 (A4 width)
Common values:

A4: 210mm
Letter: 215.9mm
Legal: 215.9mm



page_height_mm (Number)

Description: Custom page height in millimeters
Type: Static number
Default: 297 (A4 height)
Common values:

A4: 297mm
Letter: 279.4mm
Legal: 355.6mm




Cropping Parameters (Optional)
These parameters allow you to capture only a specific region of the target element, measured in pixels from the element's top-left corner.
crop_x (Number)

Description: Starting X position (horizontal offset) for the crop area
Type: Dynamic value (number)
Default: 0 (start from left edge)
Example: 300 would skip the first 300 pixels from the left

crop_y (Number)

Description: Starting Y position (vertical offset) for the crop area
Type: Dynamic value (number)
Default: 0 (start from top edge)
Example: 100 would skip the first 100 pixels from the top

crop_width (Number)

Description: Width of the region to capture in pixels
Type: Dynamic value (number)
Default: null (captures full width minus crop_x)
Example: 1700 would capture 1700 pixels wide
Note: If you set crop_x to 300 and crop_width to 1700, you're capturing pixels 300-2000 horizontally

crop_height (Number)

Description: Height of the region to capture in pixels
Type: Dynamic value (number)
Default: 0 (captures full height minus crop_y)
Example: 1200 would capture 1200 pixels tall


Spacing Parameters (Optional)
padding_mm (Number)

Description: Inner spacing between the content and an optional border, in millimeters
Type: Static number
Default: 0
Visual effect: Creates a border frame around your content when > 0
Example: 5 creates a 5mm padded border

margin_mm (Number)

Description: Outer spacing from the page edges, in millimeters
Type: Static number
Default: 25
Example: 15 creates a 15mm margin on all sides

Free

For everyone

stars   •   0 ratings
2 installs  
This plugin does not collect or track your personal data.

Other actions

Platform

Web

Contributor details

Anuj Manoj Agrawal logo
Anuj Manoj Agrawal
Joined 2022   •   1 Plugin
View contributor profile

Instructions

Types

This plugin can be found under the following types:
Background Services   •   Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:

Resources

Support contact
Documentation

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble