=== Posts to PDF - Backend Batch Export ===
Contributors: onodev77
Tags: posts to pdf, export posts, pages to pdf, export, batch export
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 3.3.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Export WordPress posts, pages and custom post types to PDF with batch export, PDF preview, separate PDFs and customizable output.

== Description ==

**Posts to PDF - Backend Batch Export** lets WordPress administrators turn posts, pages and custom post types into PDF files directly from the WordPress dashboard.

It is designed for site owners, publishers, documentation websites, knowledge bases, blogs and content-heavy WordPress installations that need a practical way to archive, download or distribute existing content as PDF.

You can search and select content from the backend, preview the PDF output, choose how the document should look and export the selected items either as a single combined PDF or, in PRO, as separate PDF files.

= Export WordPress content to PDF =

The plugin works directly from the WordPress admin area. There is no need to manually copy and paste articles into another application.

You can export:

* Posts
* Pages
* Custom post types
* Selected content from search results
* Multiple items in a single operation

The plugin first processes WordPress content through the standard content filters and also includes compatibility cleanup for common page builders when builder shortcodes remain visible in the PDF.

= PDF export options =

Before exporting, you can customize the generated PDF with options such as:

* Featured image
* Author
* Publication date
* Excerpt
* Page size
* Page orientation
* Filename prefix
* PDF preview before export

Images are normalized to fit within the PDF page width, and HTML tables are styled to improve readability in A4 and Letter layouts.

= Single PDF or Separate PDFs =

Two export workflows are available:

**Single combined PDF**
Creates one PDF containing all selected posts or pages. This is useful for smaller selections, reports, collections, guides and grouped content.

**Separate PDFs**
Creates one PDF for each selected post or page. This is the recommended workflow for larger exports because every item is processed separately and requires fewer server resources.

The plugin includes progress information for batch processing and additional server diagnostics if a combined PDF cannot be rendered.

= Free features =

* Export selected posts, pages and supported custom post types.
* Create one combined PDF from selected content.
* Export separate PDFs for up to 20 posts/pages.
* Search and paginated content selection.
* PDF preview.
* Include or exclude featured image, author, date and excerpt.
* Choose page size and orientation.
* PDF-friendly image handling.
* Table formatting for PDF output.
* Compatibility cleanup for common page builder shortcodes.
* Free-version watermark on generated PDFs.

= PRO features =

The PRO version is intended for larger WordPress sites and bulk export workflows.

* Select all posts/pages from the current post type.
* Select all items matching the current search.
* Export each post/page as a separate PDF.
* Unlimited bulk export workflow.
* Progress bar for large exports.
* Remove the Free watermark.

For large sites, **Separate PDFs** is the recommended export mode because very large combined PDFs may require a high PHP memory limit on the hosting server.

Info & Upgrade: [WordPress Posts to PDF PRO](https://softwareapp.it/wordpress-posts-to-pdf/)

= Page builder compatibility =

The plugin renders content using the normal WordPress content filters first.

If page builder shortcodes are still present in the output, it applies additional compatibility cleanup for common builders and shortcode systems including:

* Divi
* WPBakery / Visual Composer
* Avada / Fusion Builder
* Themify
* Shortcodes Ultimate
* Similar shortcode-based modules

The goal is to preserve readable article content whenever possible.

Some very complex frontend layouts, dynamic widgets or builder-specific visual effects may not look exactly the same in the generated PDF as they do in the browser.

= Images and tables =

The plugin includes PDF-oriented handling for WordPress images:

* Large images are resized to fit within the PDF page.
* Fixed width and height attributes that can cause clipping are normalized.
* Browser-only lazy-loading attributes are cleaned before rendering.
* Common Divi image module shortcodes can be converted into normal PDF images when needed.
* Images that cannot be reliably loaded by the PDF engine are removed instead of displaying a broken-image placeholder.

HTML tables are also styled to fit within the available PDF width, with word wrapping for long content.

= Built for backend batch export =

Posts to PDF is intended for administrators and editors who need to export existing WordPress content without opening every article individually.

Typical uses include:

* Creating PDF archives of website articles.
* Exporting documentation or knowledge-base content.
* Saving posts for offline reading.
* Generating PDFs for clients or internal teams.
* Creating separate PDF copies of large groups of posts.
* Building small combined PDF collections from selected articles.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins menu in WordPress.
3. Click **Settings** below the plugin name or open **Posts to PDF** from the WordPress admin menu.
4. Search for and select the posts/pages you want to export.
5. Choose Single PDF or Separate PDFs.
6. Configure the PDF options and start the export.

== Frequently Asked Questions ==

= Can I export WordPress posts to PDF in bulk? =

Yes. You can select multiple posts or pages from the plugin interface and export them in one operation. PRO also includes Select All for the current post type or current search results.

= Can I export one PDF per post/page? =

Yes. Separate PDFs mode creates one PDF for each selected post or page. The Free version supports separate export for up to 20 items, while PRO is designed for unlimited bulk workflows.

= Can I create one PDF containing multiple posts? =

Yes. Single combined PDF mode places the selected items into one PDF document.

For very large selections, Separate PDFs is recommended because a single document containing hundreds of pages can require considerably more PHP memory and server resources.

= Can I select all posts from a site? =

Yes. In the PRO version you can select all posts/pages from the current post type or all items matching the current search.

= Can I preview the PDF before exporting? =

Yes. The plugin includes PDF preview so you can check the output before starting the final export.

= Can I customize the PDF appearance? =

Yes. You can include or exclude the featured image, author, date and excerpt, and choose the page size and orientation.

= Does it support custom post types? =

Yes. The plugin is designed to work with supported public WordPress post types in addition to standard posts and pages.

= Does it support page builders like Divi, WPBakery, Avada or Elementor? =

The plugin renders WordPress content using the standard content filters first. If builder shortcodes are still visible in the PDF, the plugin applies compatibility cleanup for common builders such as Divi, WPBakery/Visual Composer, Avada/Fusion Builder, Themify and similar modules, while keeping readable text content where possible.

Because page builders can generate very complex frontend layouts, the PDF may not reproduce every visual element exactly as it appears on the website.

= Are Divi image modules included in the PDF? =

The plugin includes a fallback that converts common Divi image module shortcodes into normal PDF images when Divi does not render them in the export context.

= Are tables supported in exported PDFs? =

Yes. HTML tables are styled to fit the PDF page width. The plugin also includes a fallback for some builder/table shortcodes, but very complex frontend builder layouts may not be reproduced exactly in the PDF.

= Can I choose the local folder where PDFs are saved? =

PDFs are downloaded by the browser. The local download folder is controlled by the browser and operating system. WordPress cannot directly choose a folder on the user's computer.

= Why can a very large Single PDF fail? =

A combined PDF must be rendered as one large document, so it can require significantly more PHP memory and processing time than separate PDFs.

For large exports, use Separate PDFs. The plugin also includes additional PHP/server diagnostics when combined rendering fails.

= Does the plugin work entirely from the WordPress backend? =

Yes. The export interface is available in the WordPress administration area and is intended for administrators and editors with the required permissions.

== Changelog ==

= 3.3.4 =
* Simplified plugin action links in the Plugins screen.
* Added standard Settings and Upgrade to PRO links without custom row-action styling.

= 3.3.3 =
* Fixed plugin action links layout in Plugins screen when admin CSS forces row-action spans onto separate lines.
* Uses named action-link keys (Settings / Export and Upgrade to PRO) instead of numeric CSS classes.

= 3.3 =
* Changed the default export mode to Separate PDFs, the recommended option for large exports.
* Renamed export modes to make the recommended use case clearer.
* Added an inline warning when Single combined PDF is selected.
* Added a confirmation warning for combined exports over 30 items; users can still continue.
* Kept the 100-item safety limit for a single combined PDF (filterable).
* Retained detailed PHP/server diagnostics for combined PDF rendering failures.

= 3.2 =
* Added detailed PHP/server diagnostics for combined PDF rendering failures, including fatal error/exception message, source file/line, peak memory usage and PHP memory_limit.

= 3.1 =
* Single PDF export now prepares selected posts one by one and shows the current title and exact progress.
* Combined PDFs are generated as protected temporary files and downloaded through the authenticated handler.
* Reduced peak memory usage by releasing Dompdf document structures before saving or streaming the PDF.
* Added clearer error handling and cancellation for combined exports.

= 3.0 =
* Improved cleanup for escaped lazy-load image markup inside noscript blocks.
* Fixed cases where escaped <img> fallback code could be printed as visible text in PDFs.

= 2.9 =
* Removed noscript fallback blocks before PDF rendering to prevent lazy-load image markup from being printed as visible text in exported PDFs.
* Cleaned browser-only lazy loading attributes before Dompdf rendering.

= 2.8 =
* Improved Divi compatibility for image modules that were missing from exported PDFs.
* Added conversion for Divi/Table Maker frontend table markup into standard HTML tables for better PDF rendering.
* Improved recovery of builder images and tables when builder output is not available in the PDF export context.

= 2.7 =
* Improved Classic Editor image handling in PDFs. WordPress caption wrappers and fixed image dimensions are normalized so large images fit within Letter/A4 pages instead of being cut off.
* Removed PDF-unfriendly image attributes such as fixed width/height, srcset and sizes before Dompdf rendering.

= 2.5 =
* Improved PDF image sizing so Classic Editor images fit within the PDF page width and are not cut off.
* Added fallback conversion for common Divi image module shortcodes.
* Improved table styling for PDF exports, including better width handling and word wrapping.
* Added extra builder compatibility prefixes for Divi-related table/image modules.

= 2.4 =
* Added compatibility cleanup for common page builder shortcodes such as Divi, WPBakery/Visual Composer, Avada/Fusion Builder, Themify and Shortcodes Ultimate.
* Builder shortcode wrappers are removed only as a fallback when they remain visible after normal WordPress content rendering.
* Added FAQ notes about page builder compatibility.

= 2.3 =
* Improved export file security.

= 2.2 =
* Fixed individual separate PDF downloads when ZIP mode is disabled.
* Added stricter ZIP validation to prevent empty ZIP downloads when files cannot be added by the server.
* Improved temporary export cleanup after individual downloads.

= 2.1 =
* Fixed bulk export ID collection so “Select all results/site” exports all matching items instead of being affected by admin pagination or third-party query filters.
* Improved compatibility with security/cache plugins and custom post type admin filters.

= 2.0 =
* Fixed Preview when using Select all results/site in PRO mode. Preview now loads the first 5 items from the full selected scope instead of showing the upgrade popup.
* Improved PRO unlock code validation by ignoring spaces and non-alphanumeric characters.
* Bumped admin asset version to avoid cached JavaScript from optimization plugins.

= 1.7 =
* Fixed the Free watermark so it is visible again and repeated on every PDF page.
* Added an HTML fixed-position watermark layer plus Dompdf canvas stamping for better compatibility.
* External images that Dompdf cannot reliably load are removed from the PDF instead of showing a broken-image box with an X.
* Fixed ZIP downloads so files are saved with the correct .zip extension.
* Renamed export mode to “Multiple Separate PDF files (1 Post in 1 PDF)”.
* Increased the Free separate PDF limit from 5 to 20 posts/pages.

= 1.5 =
* Added preview loading spinner/progress indicator while Dompdf prepares the inline preview.
* Added Free watermark to exported PDFs. PRO removes the watermark.
* Separate PDF export is now available in Free for up to 20 posts/pages.
* Separate PDFs are packaged into a single ZIP download to avoid browser multiple-download warnings.

= 1.3 =
* Improved admin interface.
* Added PRO unlock field.
* Added select all results/site workflow.
* Added separate PDFs export mode with progress bar.
* Added settings for filename prefix, page size, orientation and PDF content metadata.
* Improved PDF styling.

= 1.2 =
* Corrections and improvements.

= 1.1 =
* Minor corrections.

= 1.0 =
* Initial release.
