PHPackages                             voceconnect/voce-post-pdfs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. voceconnect/voce-post-pdfs

ActiveWordpress-plugin[PDF &amp; Document Generation](/categories/documents)

voceconnect/voce-post-pdfs
==========================

Generates PDF's from Posts

2.1(4y ago)45802[1 PRs](https://github.com/voceconnect/voce-post-pdfs/pulls)GPL-2.0-or-laterPHP

Since Apr 2Pushed 3y ago12 watchersCompare

[ Source](https://github.com/voceconnect/voce-post-pdfs)[ Packagist](https://packagist.org/packages/voceconnect/voce-post-pdfs)[ RSS](/packages/voceconnect-voce-post-pdfs/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (1)Versions (11)Used By (0)

Voce Post PDFs
==============

[](#voce-post-pdfs)

Contributors: johnciacia, kevinlangleyjr, brockangelo
Tags: printing, pdf
Requires at least: 3.2
Tested up to: 3.8.3
Stable tag: 1.2.3
License: GPLv2 or later
License URI:

A WordPress plugin/module that generates a pdf from a post.

Description
-----------

[](#description)

This plugin generates a PDF file from a post's content using the PHP dompdf library. Simply link to the post + '/pdf/' and a PDF will be generated. You have the ability to customize the upload path, the PDF template that is used, and the filename format through filters.

Installation
------------

[](#installation)

### As standard plugin:

[](#as-standard-plugin)

> See [Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).

### As theme or plugin dependency:

[](#as-theme-or-plugin-dependency)

> After dropping the plugin into the containing theme or plugin, add the following:

```
if( ! class_exists( 'Voce_Post_PDFS' ) ) {
	require_once( $path_to_vpp . '/voce-post-pdfs.php' );
}
```

Usage
-----

[](#usage)

Add a Download PDF link to `/pdf/`:

```
$pdf_link = esc_url( trailingslashit( get_permalink() ) . 'pdf/' );
```

### Customize with filters

[](#customize-with-filters)

**To modify the logo used in the PDF header:**

```
add_action( 'voce_post_pdfs_logo', function(){
  do_action('newsroom_custom_header_logo');
});
```

**Use your own template for the PDF, relative to the theme directory:**

```
add_filter('voce_post_pdf_print_template', function($template){
  return 'print.php';
});
```

**Modify query args:**

```
add_filter('voce_post_pdfs_save_query_args', function($args){
  if( isset( $_GET['lang'] ) )
     $args['lang'] = $_GET['lang'];
  return $args;
});
```

**Modify the default filename format (defaults to post-title.pdf):**

```
add_filter('voce_post_pdfs_save_filename', function($filename) {
  $lang = ( isset( $_GET['lang'] )  ? '-' . sanitize_key( $_GET['lang'] ) : '');
  $filename = basename($filename, '.pdf');
  return $filename . $lang . '.pdf';
});
```

**Modify the upload location on the server:**

```
add_filter('voce_post_pdfs_upload_basepath', function($basepath, $post){
  $uploads = wp_upload_dir();
  $basepath = $uploads['basedir'] . '/' . date('Y', strtotime($post->post_date) ) . '/' . date('m', strtotime($post->post_date) ) . '/pdf/';
  return $basepath;
}, 10, 2);
```

**Modify the url to the pdf:**

```
add_filter('voce_post_pdfs_upload_baseurl', function($baseurl, $post){
  $uploads = wp_upload_dir();
  $baseurl = $uploads['baseurl'] . '/' . date('Y', strtotime($post->post_date) ) . '/' . date('m', strtotime($post->post_date) ) . '/pdf/';
  return $baseurl;
}, 10, 2);
```

Changelog
=========

[](#changelog)

**1.2.3**

- Reducing calls to wp\_uploads\_dir for performance reasons

**1.2.1**
*Reorganizing the path declarations and pdf existance check in `save_post` to improve performace.*

**1.2**
*Adding a parameter to `save_pdf` to not overwrite the PDF, if the PDF already exists. `get_upload_basepath` and `get_upload_baseurl` are now public, so other plugins can retrieve a PDF's location.*

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~405 days

Recently: every ~701 days

Total

8

Last Release

1634d ago

Major Versions

1.2.3 → 2.02021-06-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/877634?v=4)[Kevin Langley Jr.](/maintainers/kevinlangleyjr)[@kevinlangleyjr](https://github.com/kevinlangleyjr)

![](https://avatars.githubusercontent.com/u/3452?v=4)[Voce Platforms](/maintainers/voceconnect)[@voceconnect](https://github.com/voceconnect)

---

Top Contributors

[![brock](https://avatars.githubusercontent.com/u/654725?v=4)](https://github.com/brock "brock (9 commits)")[![kevinlangleyjr](https://avatars.githubusercontent.com/u/877634?v=4)](https://github.com/kevinlangleyjr "kevinlangleyjr (8 commits)")[![goldenapples](https://avatars.githubusercontent.com/u/665992?v=4)](https://github.com/goldenapples "goldenapples (7 commits)")[![joehoyle](https://avatars.githubusercontent.com/u/161683?v=4)](https://github.com/joehoyle "joehoyle (1 commits)")[![smccafferty](https://avatars.githubusercontent.com/u/641462?v=4)](https://github.com/smccafferty "smccafferty (1 commits)")

### Embed Badge

![Health badge](/badges/voceconnect-voce-post-pdfs/health.svg)

```
[![Health](https://phpackages.com/badges/voceconnect-voce-post-pdfs/health.svg)](https://phpackages.com/packages/voceconnect-voce-post-pdfs)
```

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.4k99.4M384](/packages/barryvdh-laravel-dompdf)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[elegantly/laravel-invoices

Store invoices safely in your Laravel application

23546.8k2](/packages/elegantly-laravel-invoices)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
