Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter darkhorse20

    (@darkhorse20)

    Nevermind, browser caching issues. Also the second post on this page – http://wordpress.org/support/topic/404-error-when-using-a-pdf-file-in-wordpress should be stickied or bolded or something on the Description or Installation sections.

    Thread Starter darkhorse20

    (@darkhorse20)

    Ok, I lied. PDF.js Viewer Shortcode version 1.1 isn’t working out the box with WP 3.8 .

    I had to modify some code to make it work for my site. It looks like some kind of WP URL issue.

    In the file pdfjs-viewer.php, line 30, I had to edit the function pdfjs_function($incomingfromhandler) .

    To get it to work with my website, I changed this:

    $viewer_base_url= "/wp-content/plugins/pdfjs-viewer-shortcode/web/viewer.php";

    to this:

    $siteURL = home_url().'/wp'; $viewer_base_url= $siteURL."/wp-content/plugins/pdfjs-viewer-shortcode/web/viewer.php";

    (I like keep my WP core files in a ‘wp’ directory.)

    Now, it’s working fine with WP 3.8 .

    Plugin Author Ben Lawson

    (@falconerweb)

    Thanks for the code @darkhorse20 , I have added it to the plugin so others don’t have this problem.

    Plugin Author Ben Lawson

    (@falconerweb)

    Hey,

    i just updated my plugin and it breaks my wordpress.
    Whenever I try to preview, update or publish something, wordpress is leading me to /admin/post.php and nothing more happens.

    Definately is your plugin with the update releast recently…

    Plugin Author Ben Lawson

    (@falconerweb)

    I think the problem was some spaces at the beginning of pdfjs-viewer.php . I have removed them. Try reinstalling (I didn’t make this an official update)!

    I dunno why some of the pdf’s are not loading, is there any way I can put a link next to the pdf in case it didnt load to reload that pdf?

    Thanks in advance 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Broken with 3.8’ is closed to new replies.