Title: Contributed update available
Last modified: August 20, 2016

---

# Contributed update available

 *  [Lewis Rosenthal](https://wordpress.org/support/users/lewisr/)
 * (@lewisr)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/contributed-update-available/)
 * Hi, Neerav, and thanks so much for your work on this elegant plugin.
 * I installed 2.3.1 and found a few minor things which bugged me, so I fixed them.
   🙂
 * Brief changelog:
 *  – Fix typo on options page (“Display”)
    – Fix issue with quotes in blog name
   and/or description not being properly decoded – Added option to disable header
   logo image entirely – Added option to specify left/right alignment of icon
 * Updated package (version 2.3.2) available from my FTP server:
 * ftp://ftp.2rosenthals.com/ftp/pub/WordPress/plugins/wp-post-to-pdf.2.3.2.zip
 * along with diff (just the readme and two main php files changed):
 * ftp://ftp.2rosenthals.com/ftp/pub/WordPress/plugins/wp-post-to-pdf.2.3.2.diff
 * There may be (probably is) a better way to implement my changes. If you decide
   to not use my code in the official release and do something different, I’ll be
   interested to see (I’m an IT consultant and network engineer; my work with php
   is usually on the server side, and not with the actual code, but I do cobble 
   from time to time).
 * Cheers, and thanks again.
 * PS – For anyone else, the contributed zip file is fully installable, so feel 
   free to give it a whirl. If you have comments on my changes vs the official release,
   please feel free to contact me via the contact form on my site:
 * [http://www.2rosenthals.net/wordpress/contact/](http://www.2rosenthals.net/wordpress/contact/)
 * [http://wordpress.org/extend/plugins/wp-post-to-pdf/](http://wordpress.org/extend/plugins/wp-post-to-pdf/)

Viewing 11 replies - 31 through 41 (of 41 total)

[←](https://wordpress.org/support/topic/contributed-update-available/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/contributed-update-available/?output_format=md)
[2](https://wordpress.org/support/topic/contributed-update-available/page/2/?output_format=md)
3

 *  [alexblajan](https://wordpress.org/support/users/alexblajan/)
 * (@alexblajan)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306411)
 * LewisR so should I use that snippet with bitly or what ? Sorry, I’m not a newbie
   but not a coder eighter.
    Also, should I use the plugin from the repo, the official
   one or should I wait for your version ?
 *  [alexblajan](https://wordpress.org/support/users/alexblajan/)
 * (@alexblajan)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306412)
 * (double post)
 *  Thread Starter [Lewis Rosenthal](https://wordpress.org/support/users/lewisr/)
 * (@lewisr)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306413)
 * The code snippet was to illustrate my point; there’s nothing you can do with 
   it, directly.
 * As I said before, the Bitly plugin needs to be modified to allow WP Post to PDF
   to function, because right now, the Bitly plugin is likely overriding a function
   which WP Post to PDF needs to work.
 * Grab my version 2.3.6, which is the current “stable” one from me:
 * ftp://ftp.2rosenthals.com/pub/WordPress/plugins/wp-post-to-pdf.2.3.6.zip
 * Good luck
 * Lewis
 *  Thread Starter [Lewis Rosenthal](https://wordpress.org/support/users/lewisr/)
 * (@lewisr)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306414)
 * 2.4.0 (unofficial; refreshed 10 November, 2013):
 * ftp://ftp.2rosenthals.com/pub/WordPress/plugins/wp-post-to-pdf.2.4.0.zip
 * Diff against the latest official release (2.3.1):
 * ftp://ftp.2rosenthals.com/pub/WordPress/plugins/wp-post-to-pdf.2.4.0-against-
   2.3.1.diff
 * Diff against my previous version (2.3.6 unofficial):
 * ftp://ftp.2rosenthals.com/pub/WordPress/plugins/wp-post-to-pdf.2.4.0.diff
 * What’s new:
 * Updated TCPDF to 6.0.043, including a huge number of new fonts (much larger package).
 * Fixed tcpdf/config/tcpdf_config.php, which was apparently the cause of the missing
   images in the previous releases of this build.
 * Added option to include tags in PDF, if present. Tags are presented under Categories,
   and as clickable links (what a job that was, as get_the_category_list works differently
   than get_the_tags). If no tags are present, the line is skipped in the resulting
   pdf.
 * Added check for existence of category list, in case we are generating a pdf from
   a page vs a post. If none found, the line is skipped in the resulting pdf.
 * Ugly workaround for:
 * `PHP Warning: array_push() expects parameter 1 to be array, null given in tcpdf.
   php on line nnnnn`
 * (Tweaked a line of code in tcpdf/tcpdf.php to allow for a conditional on the 
   failing array statement. I suspect we are passing either some malformed or unexpected
   HTML to TCPDF.)
 * To-do:
 * Fix annoying truncation of certain PDFs due either to large size, large tables,
   or multiple images in posts/pages. Please advise if this is a problem.
 * Fix image positioning to better respect the HTML layout.
 * Add option to move date and/or category to the footer, with left, right, or center
   alignment.
 * Add option to specify the separator in a list of categories & list of tags.
 * Add option to remove paragraph break between author, categories, tags, date (
   to format better and waste less vertical space).
 * Add option to specify first or all categories (presently, we display the list,
   via get_the_category_list) and tags (completely different mechanism involved).
 * Add option to specify ordering/alignment (see above) of these items.
 * Allow exception to site-wide image scaling factor via shortcode (and add other
   shortcodes as overrides for various options set in the admin panel).
 * Allow for custom css definitions to apply to PDF (note that this is highly dependent
   upon css support in TCPDF class; this to-do list item refers to the ability to
   enter such css in the admin panel, and not to any specific css support). _(This
   may be working better with the updated TCPDF build; please test and advise.)_
 * Thanks to Jenny Beaumont for additional testing of the previous releases of this
   version!
 * Feedback is welcome and appreciated.
 * Note that you may request support here or via the support page on [my blog](http://www.2rosenthals.net/wordpress/help/general-help/wp-post-to-pdf-enhanced/).
 * I will likely fork this project to WP Post to PDF Enhanced. I’m currently weighing
   whether I really want to host my stuff on WordPress’ site (I am reticent to do
   that, as I don’t like other people having control over what I publish, though
   I realize that this will make updates easier). Stay tuned.
 * Enjoy!
 * Lewis
 *  [ajg-cal](https://wordpress.org/support/users/ajg-cal/)
 * (@ajg-cal)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306415)
 * fantastic – Thanks Lewis
 * I’ll test this now.
 * It wouldn’t be that much harder to update manually by zip. If not using wordpress.
   org, it would be useful if the site had some sort of RSS feed or mailing list
   so that I know when updates have been made.
 *  [2020media](https://wordpress.org/support/users/2020media/)
 * (@2020media)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306416)
 * Personally I would recommend hosting on WordPress site.
 * The plugin I rewrote, I really apreciate it being hosted by WordPress. This way
   all the updates work and are notified/pushed out to the users. I would feel bad
   if I thought there were people using my plugin that had bugs in it. Ok they don’t
   have to update it, but at least they’ve been ‘told’.
 * From the user perspective, I am also really glad to have only one place to get
   my updates from – subscribing to lots of different sites for all the dozens of
   plugins I use is a pain in the neck (something I have done in the past on Joomla
   sites I used to build a lot of).
    I am still reluctant to use plugins from outside
   the WP site because of this issue – missing updates.
 * The only weak part of the WP plugin repository IMHO is the support section (ironically
   I’m using it now) – I never used to get notified of there being queries on it
   about my plugin so users were getting annoyed at there being no response. Not
   sure if that was my own fault in setup or what though.
 * rex
 *  [ajg-cal](https://wordpress.org/support/users/ajg-cal/)
 * (@ajg-cal)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306417)
 * 2.4.0 seems to work fine for me.
 * I get the following messages when WP_DEBUG is true.
 * at the top of the page:
 *     ```
       Notice: Use of undefined constant wpptopdf - assumed 'wpptopdf' in /srv/test.gunyon.co.uk/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 40
   
       Notice: Undefined index: format in /srv/test.gunyon.co.uk/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 121
       ```
   
 * next to the pdf download link:
 *     ```
       Notice: Undefined index: nonPublic in /srv/test.gunyon.co.uk/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 429
   
       Notice: Undefined index: onSingle in /srv/test.gunyon.co.uk/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 432
   
       Notice: Undefined index: format in /srv/test.gunyon.co.uk/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 436
   
       Notice: Undefined index: query in /srv/test.gunyon.co.uk/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 457
       ```
   
 * I’ve noticed that png images in the webpage are missing in the pdf, which isn’t
   a big problem as I can use jpeg instead.
 * Also some custom styling in the webpage doesn’t appear in the pdf, although this
   might be expected. The styling comes from a simple plugin that makes noteboxes
   from shortcodes.
 *     ```
       PDF Formatting Options
       Other Plugins
       Process Shortcodes
       ```
   
 * Also updating with zip upload via the wp-admin interface might not work for many
   people because of the large increase in plugin size.
 * [http://test.gunyon.co.uk/pdf-test/](http://test.gunyon.co.uk/pdf-test/)
 *  Thread Starter [Lewis Rosenthal](https://wordpress.org/support/users/lewisr/)
 * (@lewisr)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306418)
 * Thanks, Alex; excellent points. Rex: also well taken, concerning hosting the 
   plugin here. I will get things rolling in that direction ASAP.
 * Back to your issues, Alex:
 * Undefined constants & indexes when notices are enabled in logging (either through
   WP_DEBUG or in php.ini:
 * Yech, what a mess. Talk about log spam! Okay, fixed. This was just some tidying
   that needed to get done (I should have looked several releases back, as this 
   has been hanging around since before my work).
 * If it’s easy for you to replace a single file, grab:
 * ftp://ftp.2rosenthals.com/pub/WordPress/plugins/wp-post-to-pdf.php-2.4.0-1
 * and save that over wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php .
 * All downloadables have been refreshed.
 * Now, as for the missing png files…
 * It may be the placement on the page which is causing this. Can you try reversing
   he position of the jpg and the png on your page, Alex? There are indeed issues
   with some graphics, but I have not yet determined whether the issues are size-
   related, position-related, or something else. Likely I’ll need to enable debug
   output in TCPDF to find the actual culprit.
 * It is also a known issue that the modifications from some plugins are not being
   respected. One of the reasons for updating the TCPDF component was that the newer
   ones are supposed to better handle css. That said, we do have lingering issues(
   for me, it’s with SyntaxHighlighter, but that’s likely only because that’s the
   only text-formatting plugin I’m using; the footnotes plugin I use seems to work
   just fine).
 * Finally, I’m open to suggestions WRT breaking out the fonts and/or entire TCPDF
   component to make upgrades easier. Your point is again well taken that not everyone
   may be able to push 13MB each time, though this may be a moot point once I get
   the plugin hosted here.
 * Thanks again!
 *  Thread Starter [Lewis Rosenthal](https://wordpress.org/support/users/lewisr/)
 * (@lewisr)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306419)
 * BTW, the images on [this page](http://www.2rosenthals.net/wordpress/removing-social-networking-links-from-wptouch-free-version-500/)
   of my blog are both pngs. The pdf seems to render fine for me. However, while
   all of the images on [this page](http://www.2rosenthals.net/wordpress/help/general-help/wp-post-to-pdf-enhanced/)
   rendered – also pngs – are intact, the pdf is indeed truncated after the first
   cell in the second table, so the last png is missing from the output. This may
   have something to do with the table (I’ve seen some reports about issues with
   TCPDF and tables) or something else (file size, size of images to that point,
   some buffer overflow, etc.); I am not sure as yet.
 * Cheers
 * Lewis
 *  [ajg-cal](https://wordpress.org/support/users/ajg-cal/)
 * (@ajg-cal)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306420)
 * Hi Lewis
 * I added more variations and content to the test page. I _think_ more variations
   didn’t make a difference to the png problem.
 * I updated wp-post-to-pdf.php with the file you linked. The pngs seem to be displaying
   in the pdf properly now.
 * I didn’t test very carefully I’m afraid, so I’m not sure if it was changing the
   page content or updating the php file which solved the png display problem.
 * All WP_DEBUG messages have gone after update.
 * Different fonts work.
 * The tables seem to disrupt the central alignment of the image directly after 
   the table.
 * I added a second table and it seems to be repeatable – a problem with tcpdf perhaps?
 * let me know if there’s anything else I can test
 *  Thread Starter [Lewis Rosenthal](https://wordpress.org/support/users/lewisr/)
 * (@lewisr)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306421)
 * Alex, you have been an immense help. Thanks so much for your time and valuable
   feedback (I certainly have the resources to set up a sandbox for this instead
   of my own live-fire testing; I should heed some of my own advice every now and
   again).
 * Indeed, following onto what we suspected with tables having something to do with
   the issues, it seems that I’ve discovered/confirmed that TCPDF is quite persnickety
   about the HTML (in general), and tables seem to be real thorns in its side.
 * In my case, I found that the second table on my page had embedded paragraph tags
   within a cell. These were not even meant for the cell itself, but rather, display
   in the footnotes (recall my earlier mention of the footnotes plugin I use). Changing
   those to line breaks, fixed the truncation of the pdf which I was seeing before.
   Also of note was the fact that I hadn’t set the alignment of that table or the
   one following, unlike the initial table. Setting those to left, I ultimately 
   got the expected output (pagination could be better, but I’ll leave that for 
   a subsequent enhancement via shortcode). Check your HTML near the “misaligned”
   image and see if indeed there is an alignment statement in the code. I have a
   hunch that your table is specified as left-aligned, and while WP is respecting
   your center-alignment of the subsequent image on-screen, something is either 
   missing in between or otherwise keeping the center alignment statement from making
   it through to TCPDF. I have [a page which similarly misbehaves](http://www.2rosenthals.net/wordpress/help/general-help/betterprivacy-mod-for-seamonkey/);
   I’ll look at that, now that I have a better grasp on the whole tables thing.
 * Thanks for confirming that the noise level has dropped since I fixed the initialization
   of those variables, though I doubt that the notices had anything to do with the
   lack of rendering that png for you. I suspect it was some edit, and perhaps the
   removal of a misplaced paragraph tag (tip: check the raw HTML for quirks), which
   made the difference.
 * Great test page, BTW!
 * Cheers, and again, many, many thanks.
 * Lewis

Viewing 11 replies - 31 through 41 (of 41 total)

[←](https://wordpress.org/support/topic/contributed-update-available/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/contributed-update-available/?output_format=md)
[2](https://wordpress.org/support/topic/contributed-update-available/page/2/?output_format=md)
3

The topic ‘Contributed update available’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-post-to-pdf_f197af.svg)
 * [WP Post to PDF](https://wordpress.org/plugins/wp-post-to-pdf/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-post-to-pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-post-to-pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-post-to-pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-post-to-pdf/reviews/)

## Tags

 * [align](https://wordpress.org/support/topic-tag/align/)
 * [contribute](https://wordpress.org/support/topic-tag/contribute/)
 * [contributor](https://wordpress.org/support/topic-tag/contributor/)
 * [logo](https://wordpress.org/support/topic-tag/logo/)
 * [quote](https://wordpress.org/support/topic-tag/quote/)

 * 41 replies
 * 10 participants
 * Last reply from: [Lewis Rosenthal](https://wordpress.org/support/users/lewisr/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/contributed-update-available/page/3/#post-3306421)
 * Status: not resolved