Forums

[resolved] WP-MPDF plugin open the pdf in a new tab or window (13 posts)

  1. bseidner
    Member
    Posted 4 months ago #

    I want to know is there a solution for the wp-mpdf plugin to open a new tab or window? I do not want the users have to hit the back button to get back to my blog page.

  2. fkrauthan
    Member
    Posted 3 months ago #

    Is fixed, there is now a first param. if you set this to true the pdf would open in a new tab.

  3. xslord
    Member
    Posted 3 months ago #

    HI, i am kinda newbie so i need some help!

    I am not sure which template, and where do i need to insert the php code.

    Did some playin around and got somewhere a pdf icon, but when i click on i get the following error:

    fatal error: Call to undefined function wp_syntax_before_filter() in [www root path]/wordpress/wp-content/plugins/wp-mpdf/geshi.inc.php on line 15

    Any help is appreciated

  4. fkrauthan
    Member
    Posted 3 months ago #

    • Ok at first uf you got the second error you can go to Plugins => wp-mpdf and discheck the box after Geshi Parsing (At the next release the settings menu goes to the submenu Settings
    • For adding the PDF button you can add the php function code to your page.php in your template dir if you wish to print pages as PDF and to your single.php if you wish to print posts as pdf and to both of them if you wish to allow both to be print as PDF. You must edit this php files in your template dir. (Its the dir with the name of the template you have chocen in your wordpress installation (the default theme is: "Wordpress Classic" or "Wordpress Defaul" i think)
  5. xslord
    Member
    Posted 3 months ago #

    Thanx for you QUICK reply

    I followed your instruction and indeed no error message. Big Thanx!

    Your next answer helped me as well! but not completely, i get the pdf icon on PAGES but not on POSTS (i am using the default theme of WP), what am i missing?

  6. fkrauthan
    Member
    Posted 3 months ago #

    For posts you must add the PHP code to the single.php file. (I think that was the file for posts)

  7. davidjustin
    Member
    Posted 2 months ago #

    I get the PDF icon to show up but when you click on the link the page is blank.

    I manually moved the themes folder also.

    Any suggestions?

  8. davidjustin
    Member
    Posted 2 months ago #

    Figured it out.

    Had to "save" the settings after moving the themes folder.

    Great plug-in!

    -DJR

  9. lucasfire
    Member
    Posted 2 months ago #

    Hi,

    I have same problem davidjustin, but i didn't manually move the themes.
    The button show, but when click it open a blank page.

    Follow link:
    http://clinicaatena.com.br/blog/2009/09/14/ola-mundo/

    Tks for help

  10. fkrauthan
    Member
    Posted 2 months ago #

    still with update 1.8 which comes out today the link generation is new so i think the bug goes away. Could some of you test it?

  11. lucasfire
    Member
    Posted 2 months ago #

    Hi fkrauthan,

    I have apply the update 1.8, in settings i generate links again as "default" and after as "day and name".
    In both off them have not work.
    Follow the link:
    http://clinicaatena.com.br/blog/2009/09/14/ola-mundo/

    tks a lot

  12. fkrauthan
    Member
    Posted 2 months ago #

    Coukd you pls contact me by mail. You can find my contact datas at my homepage http://www.fkrauthan.de . Then i could test with you some thinks to fix this bug.

    For the first test you can raise the memory that wordpress and php can use for there site. I think that could fix the error.

  13. yabudi
    Member
    Posted 2 weeks ago #

    Hi fkrauthan,

    I have the same issue as lucasfire. Blank window appears instead of the pdf file.

    Any ideas?

    Thanks,

Reply

You must log in to post.

About this Topic