How To: Simple domPDF Example

Seems as though I was attempting to perform this PDF creation too late in the lifecycle of the page. After adding this snippet to an action binding to init, it works perfectly.

Search through documents folder

get_bloginfo(‘template_directory’) returns a URI and I believe glob works with paths so try: $dir = get_theme_root() . “/documents/*”; foreach(glob($dir) as $file) { echo $file; }

Build custom pdf from users choices

If you are looking for an industrial strength solution, you might consider AppendPDF by Appligent (and/or other products from them). As a command line application, it is very easy to integrate and to run. Alternatively, there are several libraries (such as iText, pdflib, etc.) which could be used to create such customized documents. Ah, yeah, … Read more

Create Custom Post Type PDF File (Like Media) Then Add Searchable Custom Fields

Did you try creating a custom post type, and adding custom fields with Advanced Custom Fields? Advanced Custom Fields makes it easily to add custom fields to a post, and gives the possibility to hide other elements, like the content editor and featured image. In my opinion, you should create a custom post type, and … Read more

Password protected uploaded PDF page

Try using the Advanced Custom Fields plugin: http://www.advancedcustomfields.com/ You can add a file(s) upload field to your “designs” post type, and hide the regular content editor. Then you can create a custom template for that post type that displays the files attached to the post.