{"id":30225,"date":"2014-06-24T07:26:35","date_gmt":"2014-06-24T07:26:35","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-pdf-templates\/"},"modified":"2017-06-05T14:45:31","modified_gmt":"2017-06-05T14:45:31","slug":"wp-pdf-templates","status":"closed","type":"plugin","link":"https:\/\/so.wordpress.org\/plugins\/wp-pdf-templates\/","author":13431684,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4.3","stable_tag":"1.4.3","tested":"4.4.34","requires":"4.0","requires_php":"","requires_plugins":"","header_name":"WordPress PDF Templates","header_author":"@anttiviljami","header_description":"","assets_banners_color":"ffffff","last_updated":"2017-06-05 14:45:31","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/seravo.fi\/","header_plugin_uri":"https:\/\/github.com\/anttiviljami\/wp-pdf-templates","header_author_uri":"https:\/\/github.com\/anttiviljami","rating":4.1,"author_block_rating":0,"active_installs":400,"downloads":19484,"num_ratings":21,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0":"<p>Please upgrade WordPress PDF Templates to the newest version. It won&#039;t break anything. Promise!<\/p>"},"ratings":{"1":4,"2":0,"3":1,"4":1,"5":15},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1359729","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1359729","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"1359729","resolution":"1544x500","location":"assets"},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"937727","resolution":"772x250","location":"assets"},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1359729","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2.1","1.3.9","1.4.2","1.4.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"937743","resolution":"1","location":"assets"}},"screenshots":{"1":"See example use of this plugin here: http:\/\/vetrospace.com\/"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[50190,1764,3153,21488,4516],"plugin_category":[43,50],"plugin_contributors":[80820],"plugin_business_model":[],"class_list":["post-30225","plugin","type-plugin","status-closed","hentry","plugin_tags-dompdf","plugin_tags-pdf","plugin_tags-print","plugin_tags-seravo","plugin_tags-templates","plugin_category-customization","plugin_category-media","plugin_contributors-zuige","plugin_committers-zuige"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-pdf-templates_ffffff.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-pdf-templates\/assets\/screenshot-1.png?rev=937743","caption":"See example use of this plugin here: http:\/\/vetrospace.com\/"}],"raw_content":"<!--section=description-->\n<p>WordPress PDF Templates<\/p>\n\n<p>This plugin utilises the DOMPDF Library to provide a simple URL endpoint e.g. http:\/\/my-site.com\/my-post\/pdf\/ that generates a downloadable PDF file.<\/p>\n\n<p>If pretty permalinks are disabled. GET parameters (e.g. ?p=1&amp;pdf) can be used instead.<\/p>\n\n<p>The PDF output can be customized by copying the index-pdf.php file from the plugin directory to your theme and creating your own custom template for PDF prints.<\/p>\n\n<p>Stylesheets used on the site are disabled by default, but you can define your own stylesheets within the pdf-template.php file. PDF Templates can be previewed as raw HTML at the \/pdf-preview URL endpoint.<\/p>\n\n<p>Source available at https:\/\/github.com\/anttiviljami\/wp-pdf-templates<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download and activate the plugin.<\/li>\n<li>Installation done! You can now navigate to any post or page on your website and append \/pdf\/ (or &amp;pdf if not using pretty permalinks) to the URL to view a glorious PDF version of it.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Download and activate the plugin.<\/li>\n<li>Installation done! You can now navigate to any post or page on your website and append \/pdf\/ (or &amp;pdf if not using pretty permalinks) to the URL to view a glorious PDF version of it.<\/li>\n<\/ol><\/dd>\n<dt>I activated the plugin but can't see any difference. What do I do?<\/dt>\n<dd><p>WordPress PDF Templates works quietly in the backround without cluttering your wp-admin with unnecessary menus and views.<\/p>\n\n<p>To see this plugin in action, try navigating to any post or page on your site and appending \/pdf\/ to the URL.<\/p><\/dd>\n<dt>My PDF is displaying the wrong post content<\/dt>\n<dd><p>Is your content access-restricted? In that case, all you need to do is enable cookies for the plugin with <code>define('FETCH_COOKIES_ENABLED', true);<\/code> in your wp-config.php<\/p>\n\n<p>You can also try clearing the PDF cache by hard-refreshing your browser or disabling the PDF cache altogether with <code>define( 'DISABLE_PDF_CACHE', true )<\/code><\/p><\/dd>\n<dt>How do I enable PDF Templates for custom post types?<\/dt>\n<dd><p>You can define supported post types in your theme functions.php with <code>set_pdf_print_support($post_types)<\/code><\/p>\n\n<p>The set_pdf_print_support function takes an array of post types (strings) as a parameter.<\/p>\n\n<p>Example:\n    \/\/ add pdf print support to post type 'product'\n    if(function_exists('set_pdf_print_support')) {\n      set_pdf_print_support(array('post', 'page', 'product'));\n    }<\/p><\/dd>\n<dt>I don't like the way my PDF printing looks. How do I change it?<\/dt>\n<dd><p>Just copy index-pdf.php from wp-content\/plugins\/wp-pdf-templates\/ into your theme directory and start editing!<\/p>\n\n<p>If you wish to define different templates for different post types, you can do that too! Let's say you wish to create a new PDF template for pages. Just create a file called 'page-pdf.php' and create your template there. Note that this only works when a page.php exists in your theme.<\/p><\/dd>\n<dt>Can I change the PDF output paper size, orientation or DPI?<\/dt>\n<dd><p>Yes! You can define settings for the DOMPDF Library by editing your wp-config.php.<\/p>\n\n<p>Example:\n    \/\/ use landscape A4 sized paper @ 180 DPI\n    define('DOMPDF_PAPER_SIZE', 'A4');\n    define('DOMPDF_PAPER_ORIENTATION', 'landscape');\n    define('DOMPDF_DPI', 180);<\/p>\n\n<p>See DOMPDF documentation for more options.<\/p><\/dd>\n<dt>My fonts don't show in the PDF. Can I fix that?<\/dt>\n<dd><p>DOMPDF needs the proper font files to generate PDF files. There's a font adder utility built in to DOMPDF you can use to import any TrueType fonts. See this link for instructions: https:\/\/code.google.com\/p\/dompdf\/wiki\/Installation<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>= 1.4.1\n* Automatically fall back to http if https doesn't work<\/p>\n\n<p>= 1.4.0\n* Updated to newest version of DOMPDF, attribute plugin to @anttiviljami instead of Seravo<\/p>\n\n<h4>1.3.9<\/h4>\n\n<ul>\n<li>Just marking compatibility and small cleanup<\/li>\n<\/ul>\n\n<h4>1.3.7<\/h4>\n\n<ul>\n<li>Cookies are now passed as a raw header for a simpler system<\/li>\n<\/ul>\n\n<h4>1.3.6<\/h4>\n\n<ul>\n<li>Added more cookie logic and a fix for non-encoded cookies<\/li>\n<li>General cleanup of documentation &amp; code<\/li>\n<\/ul>\n\n<h4>1.3.5<\/h4>\n\n<ul>\n<li>Request cookie relaying is now optional and disabled by default<\/li>\n<li>If this update causes any issues, try enabling the constant FETCH_COOKIES_ENABLED<\/li>\n<\/ul>\n\n<h4>1.3.4<\/h4>\n\n<ul>\n<li>Custom fonts are now retained in plugin updates<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>PHP 5.2 compatibility added, upgraded to newest version of dompdf lib<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Fixes issue with pretty permalinks disabled. Thanks Triskal!<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Cookies added to template requests<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>HTML output is no longer based on output buffering, which makes everything more stable<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release to WordPress.org<\/li>\n<\/ul>","raw_excerpt":"This plugin utilises the DOMPDF Library to provide a URL endpoint e.g. \/my-post\/pdf\/ that generates a downloadable PDF file.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/30225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=30225"}],"author":[{"embeddable":true,"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/zuige"}],"wp:attachment":[{"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=30225"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=30225"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=30225"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=30225"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=30225"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/so.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=30225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}