where to put code sent for disabling auto-zoom when loading pdf

QuestionsCategory: PDF Light Viewerwhere to put code sent for disabling auto-zoom when loading pdf
Susan Pinto asked 5 months ago

where to put code sent for disabling auto-zoom when loading pdf

magnetworx replied 3 months ago

I posted this 2 months ago! I go no answer?

1 Answers
supportsupport answered 3 months ago

Hello Susan,
The plugin doesn’t have built-in function to solve your case. However it’s easy to implement with few lines of javascript code:
 

(function($) {
    $(document).ready(function() {
        setTimeout(function() {
            $('.js-pdf-light-viewer-toggle-zoom').trigger('click');
        }, 500);
    });
})(jQuery);

 
Please place this code inside any javascript file on your page (here is some info about it https://codex.wordpress.org/Using_Javascript if you\’re not familiar with it yet). Or you even can use the plugin similar to https://wordpress.org/plugins/custom-css-js/ and paste the code there.
 
Please let me know if it will help.