Forums

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

  1. bseidner
    Member
    Posted 2 years 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 2 years 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 2 years 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 2 years 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 2 years 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 2 years 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 years 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 years ago #

    Figured it out.

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

    Great plug-in!

    -DJR

  9. lucasfire
    Member
    Posted 2 years 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 years 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 years 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 years 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 years ago #

    Hi fkrauthan,

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

    Any ideas?

    Thanks,

  14. fkrauthan
    Member
    Posted 2 years ago #

    Ok the blank windows shoudl be gone away sinc version 2.0.2 if some one hase trouble with blank windows. Please write me.

  15. aakashd
    Member
    Posted 1 year ago #

    hi fkrauthan,
    I have enabled the plugin and added the button script to single.php

    This creates the download button, but on clicking it shows a blank page.

    I did not understand the installation instruction "Place your templates into /wp-content/wp-mpdf-themes" provided on site. Am I suppose to copy only the file single.php there? Should I remove it from original theme folder?

    Thanks,
    aakash

  16. fkrauthan
    Member
    Posted 1 year ago #

    have you give the right folder permission to the folders? Or have you activate a other pdf plugin? You can also try to create the folder wp-content/plugins/wp-mpdf/mpdf/tmp and give the right 777 to it.

    No the mpdf themes are PDF themes and has nothing todo with your wordpress plugin theme.

Topic Closed

This topic has been closed to new replies.

About this Topic