I managed to easily install and configure the plugin and to upload my first pdf file. Everything is fine if I preview the loaded pdf. I wanted to insert the pdf in the sidebar of my site (WP 4.6.1), so I put a text widget in the sidebar with the wp-code of the loaded pdf. What I get is a long image (plugins/pdf-light-viewer/assets/img/lightpaperfibers.png) and at the end the thumbs of the loaded pdf. See
Extra strage: if I create a new article and insert the same pdf inside, they both works on the page of the article. See
Can you please help me with some suggestion? Thank you.
We’re using some logic to insert plugin assets (styles, etc.) on-demand. Currently if you’re using shortcode on the page it will work well right out of the box. If you’re using shortcode in widget you’ll need to add [pdf-light-viewer-enqueue-assets] before the main shortcode as we described in docs.
[pdf-light-viewer-enqueue-assets]as well as
PdfLightViewer_AssetsController::frontendEnqueue()has no parameters. It should be mainly used to enqueue assets when PDF flipbook shortcode is injected with widgets. It should be inserted before main PDF flipbook shortcode.
Probably this extra shortcode wouldn’t be necessary in the next versions.
Please let me know if you still have questions.
Please login or Register to submit your answer