A powerful WordPress plugin that enables users to export blog posts to beautifully formatted, printable PDFs with extensive customization options.
- One-Click PDF Generation: Convert any post or page to PDF with a single click
- Mass Export Functionality: Export all your posts to individual PDFs in a single ZIP file
- Extensive Customization Options:
- Font selection and sizing
- Button sizing
- Professional PDF Layout:
- Preserves images and formatting
- Supports custom post types
- Maintains hyperlinks
- Multilingual Support:
- Fully translatable
- RTL language support
- Developer Friendly:
- Extensible architecture
- Action and filter hooks
- Well-documented code
- WordPress 5.2 or higher
- PHP 7.2 or higher
- Modern web browser
- Download the plugin zip file
- Go to WordPress admin panel > Plugins > Add New
- Click "Upload Plugin" and choose the downloaded zip file
- Click "Install Now" and then "Activate"
- Navigate to Settings > WP Post To PDF in your WordPress admin panel
- Configure the following settings:
- PDF Layout Options
- Header & Footer Content
- Font Settings
- Access Permissions
- Button Display Options
- Save your changes
- A "Download PDF" button will automatically appear on your posts/pages (location configurable in settings)
- Click the button to generate and download the PDF version of the content
- Navigate to Settings > WP Post To PDF
- In the Mass Export Settings section, select Posts Only option
- Click "Export Now" to generate and download a ZIP file containing PDFs of all your posts
Add the PDF download button anywhere using the shortcode:
[post_to_pdf]
Note: Be aware that if you use this shortcode, the PDF download button will also appear in the generated PDF document. Consider this when placing the shortcode in your content.
Developers can programmatically generate PDFs using:
<?php
if (function_exists('wp_post_to_pdf_generate')) {
wp_post_to_pdf_generate($post_id);
}
?>
To build the plugin from source, you'll need:
- PowerShell 5.1 or higher
- Administrator privileges
- PowerShell Module: Microsoft.PowerShell.Archive (1.0.0.0 or higher)
The plugin includes a PowerShell build script that creates a production-ready package. Here are some common usage examples:
- Basic Production Build
.\build.ps1
- Development Build
.\build.ps1 -Environment development
- Custom Output Directory
.\build.ps1 -OutputPath "C:\builds"
-PluginName
: Name of the plugin (default: "wp-post-to-pdf")-Environment
: Build environment, 'production' or 'development' (default: 'production')-OutputPath
: Custom output directory (default: ".\dist")-Verbose
: Show detailed progress information
The build script will create a plugin package ready for WordPress installation.
- For bug reports and feature requests, please use the GitHub Issues
- For general questions, visit our Support Forum
- Check our Documentation for detailed guides
We welcome contributions!
This plugin is licensed under the GPL v2 or later - see the LICENSE file for details.
Created and maintained by Pimzino.
- DOMPDF - PHP HTML to PDF converter library
- Font Awesome - Icons used in the PDF download button
- Google Fonts - For additional font options in PDFs