Blog

Back to blog posts

Save a Web Page as PDF – WordPress Plugin

Published Nov 12, 2018

Save to Pdf

Intro

Api2Pdf proudly announces the release of a brand new WordPress Plugin – Save Page to PDF. The purpose of the plugin is to make it easy to add a “Print to PDF” button on any page or article of your WordPress site. If you click the button, it will take the current page and use Api2Pdf to print it to PDF. You can test it by clicking Save to PDF button above.

Installation

You can install the plugin via the traditional means of installing WordPress plugins, either by uploading the files directly to the plugins directory on your server or via the Plugins functionality within WordPress’s administrator panel.

Activate the plugin once installed. Under Settings > PDF Settings, copy and paste your API key that you need to retrieve from portal.api2pdf.com.

Usage

On any page or post, you can use the shortcode: savepagetopdf. This will place the Save to PDF link above the main content as demonstrated on this blog post. If you need to go custom, you can make use of the window.SavePageToPdf() javascript function that is deployed on all page requests.