The Save as PDF plugin adds download buttons to your WordPress posts and pages. Visitors can download the whole page or selected content. Conversion runs on PDFCrowd’s servers.
Get the plugin from WordPress.org.
Save as PDF by PDFCrowd.
Use Filter options by name in the plugin settings to find an option. Turn on Expert Settings first to search the full set of options. Click Save Changes after changing settings.
The option reference describes each setting and shows where to find it in the plugin.
The Conversion Mode setting determines how the plugin gets the page content to convert. Changing it can help when content is missing or the result differs from what you see on your site.
Find Conversion Mode in the Mode section,
or enter conversion mode in Filter options by name.
| Page content | Start with |
|---|---|
| Public page, without visitor-entered values | URL — default |
| Private or password-protected page, without visitor-entered values | Upload |
| Completed forms, selected filters or results generated in the browser | Content |
| Localhost or intranet page | Development |
Upload and Content also work with public pages and may give better results for some sites. If the output isn’t what you expect, try these modes and compare the results.
Detailed setup:
To activate your license, open
Settings > Save as PDF > License
and select Commercial as the license type. Enter your
PDFCrowd username and
WordPress key
in the Username and API Key fields.
Get a PDFCrowd license for production use.
Without credentials, you can use the plugin’s demo mode.
Use these settings to customize the generated PDF. See the option reference for all available settings.
| Purpose | Settings |
|---|---|
| Page size and orientation | Page Size, Orientation |
| Page margins | Margin Top, Margin Right, Margin Bottom, Margin Left, No Margins |
| Headers and footers | Header HTML, Footer HTML, Header Height, Footer Height |
| Layout and scaling | Content Viewport Width, Scale Factor |
| Print styles and custom CSS | Use Print Media, Custom CSS |
| JavaScript and timing | Custom JavaScript, On Load JavaScript, Wait For Element, JavaScript Delay |
| Selecting content | Element To Convert |
Common customizations:
For more guidance, see the plugin FAQ.
To place the button in a post or page, add a Shortcode block in the WordPress editor where you want the button and paste:
[save_as_pdf_pdfcrowd]
The button uses your saved plugin settings. If automatic placement is also enabled for the same content type, disable it in the Show Button on setting so the button does not appear twice.
Add attributes to a shortcode to override the saved settings for that
button only. For example, button_text="Download PDF"
changes its label. The
option reference
shows the shortcode syntax for each setting.
Use your theme's print styles for this button's download.
[save_as_pdf_pdfcrowd
use_print_media="1"
button_text="Download PDF"]
Set use_print_media="0" to use screen styles instead.
Only the content between the opening and closing shortcodes is included in the download.
[block_save_as_pdf_pdfcrowd]
<h2>Summary</h2>
<p>Content to download.</p>
[/block_save_as_pdf_pdfcrowd]
Replace the URL with the page you want visitors to download.
[save_as_pdf_pdfcrowd
url="https://example.com/"
button_text="Download example"]
Use this helper when a theme or plugin needs to print the normal Save as PDF button from PHP instead of placing a shortcode in page content:
create_save_as_pdf_pdfcrowd_button($options = array())
The helper returns button HTML. The visitor still clicks the button in the browser, and the button uses the same conversion flow as automatic placement or shortcode placement.
The $options argument overrides the saved plugin
settings for this button only. Omit any settings that should keep their values
from Settings > Save as PDF. For example:
Use this function only when PHP code should run a conversion immediately, without showing a visitor-facing button:
pdfcrowd_save_as_pdf($options = array())
This function does not use the saved plugin settings as defaults. Pass the
conversion input and all options the conversion needs, including your PDFCrowd
username and API key. The function returns the generated file data on success
or WP_Error on failure. For example:
<?php $output = pdfcrowd_save_as_pdf(array( 'username' => '', 'api_key' => '', 'page_size' => 'Letter', 'url' => 'https://www.example.com/' )); if(!is_wp_error($output)) { echo $output; } ?>
| If this happens | Start with |
|---|---|
| Clicking the button does nothing. | Check button setup |
| Conversion fails, times out, or shows an error. | Resolve conversion errors and timeouts |
For more guidance, see the plugin FAQ.
We’re happy to help you set up the plugin, choose the right options and fine-tune the output for your site.
For conversion errors, include the error message and a debug log if available.