Save as PDF WordPress Plugin Documentation

Overview

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.

Installation

Get the plugin from WordPress.org.

  1. Log in to WordPress admin.
  2. Go to Plugins > Add New.
  3. Search for Save as PDF by PDFCrowd.
  4. Click Install Now, then Activate.
  1. Download the plugin ZIP file: save-as-pdf-pdfcrowd-4.7.0.zip.
  2. In WordPress admin, go to Plugins > Add New > Upload Plugin.
  3. Choose the ZIP file and click Install Now.
  4. Click Activate Plugin.

Getting Started

  1. In WordPress admin, open Settings > Save as PDF.
  2. Use Show Button on to choose which content types display the button, then save your changes.
  3. Visit a post or page on your website where the button is enabled.
  4. Click Save as PDF and open the generated PDF.

Using plugin settings

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.

Conversion mode

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:

License

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.

Adjust the PDF Result

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.

Customize the button

Choose where the button appears and customize its text, image and styling.

Purpose Settings
Where the button appears Show Button on
Position and alignment Destination, Alignment
Text or image Button Text, Button Display Format, Button Image
Colors and text size Text Color, Background Color, Text Size

Shortcodes

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 print styles

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.

Convert selected content

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]

Convert another page

Replace the URL with the page you want visitors to download.

[save_as_pdf_pdfcrowd
  url="https://example.com/"
  button_text="Download example"]

Advanced Usage

PHP button helper

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:

echo create_save_as_pdf_pdfcrowd_button(array(
         'page_size' => 'Letter',
         'button_text' => 'Save as Letter'
));

Server-initiated PHP conversion

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;
    }
?>

Troubleshooting

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.

Get help with your setup