Support » Plugin: PDF.js Viewer » Default settings are not taken into account

  • Hi,

    It’s great that you added default settings for the “Add PDF” button as I love your plugin and it was the only missing feature! Unfortunately, they don’t work on my sites: The generated shortcode always uses the defaults set in pdfjs-media-button.js. Even if they’re changed at the beginning of pdfjs-viewer.php, they have no effect. The only way is to edit the shortcode string generated in pdfjs-media-button.js, which is not a very good practice.
    Note: the settings I’m talking about are “Embed height” from 800 to 1360, and “Show fullscreen” set to “false”. I didn’t test the others.

    Strangely, the translations aren’t taken into account either – the only way to have the strings in French for instance, is to copy the viewer.properties file from the “fr” folder to the “en-US” folder. This has been going on forever, it’s not new to this version…

    Thanks for your help,
    RP

    • This topic was modified 1 year, 7 months ago by Erpol.
    • This topic was modified 1 year, 7 months ago by Erpol.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Thomas McMahon

    (@twistermc)

    I haven’t translated the plugin so don’t expect that to work. The source code from Mozilla is, but I have not translated the plugin.

    As far as the defaults, there is an options page, but they only work with Gutenberg. I haven’t updated everything to work with the shortcode as I’m hoping that people are moving towards Gutenberg. I’ll add it to the backlog though.

    Thread Starter Erpol

    (@erpol53)

    Hi, and thanks for the response.
    I understand that it’s working as intended then, I can continue tweaking the defaults in pdfjs-media-button.js but you understand this is not PC behavior in WordPress!
    I have to do that because content is added by non-technical people using the classic editor (Gutenberg is too complex), and they must be presented with the correct defaults – the only actions they need to do is click the button and choose the PDF.

    Speaking of translations, the entire front-end is localized in every imaginable language. Since it’s so easy to activate, I’m sure it would add tremendous value to the plugin if you implemented it – the back-end is irrelevant, most people can manage with english. That’s just my 2 cents!

    Thanks again for a great plugin
    RP

    • This reply was modified 1 year, 7 months ago by Erpol.
    • This reply was modified 1 year, 7 months ago by Erpol.
    Plugin Author Thomas McMahon

    (@twistermc)

    I have hooked up most settings for the shortcode.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Default settings are not taken into account’ is closed to new replies.