Forums

wp-mpdf
Damaged File? (25 posts)

  1. SORG
    Member
    Posted 1 year ago #

    My Problem is: When i click on the button, then an error occures, that the file, which should open, is damaged.

    The cache file is generated and correct. I think there is a problem with the dynamic ending ?output=pdf
    What do i wrong?

  2. fkrauthan
    Member
    Posted 1 year ago #

    waht do you mean with damage output? Have you an example link for me?

  3. SORG
    Member
    Posted 1 year ago #

    Of course:
    Neckermann PDF on Neckermann Online Shop

    No PDF is shown - error occures: "The file is damaged and isn´t repairable"!

    Here is the cache file

    Thank you for you support - i have no idea

  4. fkrauthan
    Member
    Posted 1 year ago #

    Hmm ok strange. If you open the Cache file it works?

  5. SORG
    Member
    Posted 1 year ago #

    If i change the permalink structure in standard, then there is a blank site, but no error.

    Cache file link is added in the post above.

  6. fkrauthan
    Member
    Posted 1 year ago #

    Hmm thaaats very strange that the cache file works but the sending of this cache file to the user not. Which php version do you use? Can you look at the php error log if there is any error?

  7. SORG
    Member
    Posted 1 year ago #

    PHP Version 5.2.12
    PHP Info

    It´s a managed dedicated server - I have an error Logfile, but there is no error concerning this site.

  8. fkrauthan
    Member
    Posted 1 year ago #

    Hmm thats very strange. Those this happend since you using this plugin?

  9. SORG
    Member
    Posted 1 year ago #

    I have found out something new. On my other site (same database & same wordpress installation) it works fine! It works also with the same permalink structure as in the problem-site.

    Here it works: Lego Restposten

    What can be wrong? I´ve changed this in wp-config.php, to use one admin for multiple WP:

    $table_prefix = str_replace(array('.', '-' ), '_', $_SERVER['HTTP_HOST'] ) . '_';
    $table_prefix = str_replace(array('www_'), '', $table_prefix);
  10. fkrauthan
    Member
    Posted 1 year ago #

    hmm is the error just this one post or are other posts also damaged?

  11. SORG
    Member
    Posted 1 year ago #

    All posts and all pages were tested.. always the same error. Could it be another plugin, which is used in the problem site?

    This is the only idea i have - Like category auto link for example. Should i disable all plugins (23x) to test it?

  12. fkrauthan
    Member
    Posted 1 year ago #

    that would be the best idea. Disable on plugin then test again and so one. Sometimes its really a plugin.

  13. SORG
    Member
    Posted 1 year ago #

    Ok i have it. Thank you man - It was a pretty exciting and intestesting thing.. The problem was the SEO Ultimate Plugin. I disabled only the "Title Tag Rewriter Modul" of this plugin and now it works how it should.

    I think you have made the best PDF Plugin of all.. And i tested a lot :)
    Do you have a plugin for printing sites or a tip?

  14. fkrauthan
    Member
    Posted 1 year ago #

    oki thats great :) You mean wordpress sites? Becous wp-mpdf should also be able to print wordpress sites^^

  15. SORG
    Member
    Posted 1 year ago #

    I´m searching for a plugin that creates printable sites. Because there are people out there, who don´t know how to handle PDF files or don´t have a program to see the PDF files. I know: Worst case scenario

  16. fkrauthan
    Member
    Posted 1 year ago #

    Oh for that my Favorit plugin is WP-Print

  17. SORG
    Member
    Posted 1 year ago #

    Thank you! One last question:

    How can i put the post title as the PDF linktext?
    How to change this code?:

    $pdf_button .= 'id="pdfbutton" href="' . apply_filters('the_permalink', get_permalink()) . $x . 'output=pdf" rel="nofollow">' . $buttontext . ' PDF Version' . '</a>';

  18. fkrauthan
    Member
    Posted 1 year ago #

    with the function function mpdf_pdfbutton($opennewtab=false, $buttontext = '', $logintext = 'Login!', $print_button = true) {. You can write your own html code on the second parameter. Then the PDF icon wouldn'T be displayed and your html code would be displayed as link text.

  19. SORG
    Member
    Posted 1 year ago #

    And how can i keep the icon and use the POST TITLE as the pdf-link?
    I would prefer sth. like "the icon"+"Barack-Obama.pdf".

    Don´t I need a php code instead of a html code? Maybe we´ve misunderstood each other.

  20. fkrauthan
    Member
    Posted 1 year ago #

    What do you exactly mean? i didn't understand your question sorry.

  21. SORG
    Member
    Posted 1 year ago #

    For example: I have the post, that title is named "Barack Obama".

    Is it posible to name the pdf link automatically "Barack Obama.pdf"?
    Aditionally I want to keep the icon.

    It´s better for SEO, i think, because so there would be individual named links to the files instead of static link-names like "Print PDF" or the like.

  22. fkrauthan
    Member
    Posted 1 year ago #

  23. SORG
    Member
    Posted 1 year ago #

    No i mean the linktext next to the little pdf icon on the post/page.
    Now it is the linktext: "pdf version"
    I want this linktext: "the post title"

    NOT the URL
    I hope i could explain, what i meant.

  24. fkrauthan
    Member
    Posted 1 year ago #

    ahhh now i know what you mean. Hmm i think vor seo there is no win to have a link text like that becouse thats not a link text its just a higlight text. But you can try somthing like that on your template: on the mpdf_pdfbutton:

    mpdf_pdfbutton(false, '<img src="' . get_bloginfo('wpurl') . '/wp-content/plugins/wp-mpdf/pdf.png" alt="'.$post->post_name.'.pdf" border="0" />')

    i dont know if it works.

  25. SORG
    Member
    Posted 1 year ago #

    I´ve put the code in my template, but no change.
    It isn´t that important - Your plugin is very useful even without this.

    Thank you for your time.
    Greetings

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags