Support » Plugin: WP Post to PDF Enhanced » Function calls don't bring content to PDF

  • Hi,
    I need to have some content displayed in the PDF but not on the Web.
    I use a class “pdfonly” which is style=”display:hidden;” in the default.css and style=”display:block;” in the custom css for ‘WP Post to PDF Enhanced’. (Don’t know if this is the designed behaviour but actually it works.)

    When I get the authors name and post date via php code only the post date is displayed, the author is always empty.
    In details,
    <?php echo get_the_date();?> works fine in Web and PDF,
    <?php echo get_the_author();?> works only for Web but not in PDF (just empty)
    I use WeaverII Theme on WP 3.9.1, plugin version 1.0.4.
    I would expect both function calls to behave in the same way but they don’t.

    Thanks for support 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Lewis Rosenthal


    Sorry, Chris; I’ll need to look at this, as off the top of my head, I’m not seeing why it doesn’t work, either. Have you given the development version a try?

    My suggestion in your other thread to upgrade to 1.0.5 still holds, as that fix was back-ported from the development build. So, if you find that 1.0.5 addresses that problem, you should still be fine moving to the development build. (Just read the topic stuck to the support threads here which outlines the download and installation procedure for the development build.)



    PS – You’re welcome for the support, and my apologies (to all) for my late follow-up.

    Hi Lewis,
    the problem remains also in 1.0.5.

    For me there is no urgency with this issue. (I’m currently the only author and therefore can use a hardcoded name in the PDF 😉 )
    I will skip using the development build for now since I don’t have an appropriate test environment.

    Can you please confirm if it’s an issue in the plugin?

    Thanks again 🙂

    Plugin Author Lewis Rosenthal


    Thanks for confirming my suspicion, Chris, that this issue has not been addressed with the more recent tweaks I made (for 1.0.5, at least).

    Any difference if you use the_author() instead of get_the_author() ? I’m also wondering whether the issue is related to the fact that get_the_author() (and the_author(), for that matter) must be used within the loop, but I don’t believe that restriction applies to get_the_date(). Thus, we are able to catch the return of get_the_date(), but not get_the_author() (just a guess; I’ll really need to test this against a few of these similar functions).

    I’ll open a ticket for this in my internal bug tracker, and we’ll keep this thread open for a while.



    No difference (Beside that there seems to be a bug in the_author() in WP because the return string contains the name two times 😉 )
    the_author(): EntrappedEntrapped
    get_the_author(): Entrapped
    the_date(): 21. Juni 2014
    get_the_date(): 21. Juni 2014

    get_the_date(): 21. Juni 2014

    So long

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Function calls don't bring content to PDF’ is closed to new replies.