Support » Plugin: PDF Embedder » I meet cases where pdf-embedder plugin is not loaded

  • Resolved Trebly

    (@trebly)


    Hi,

    I have the following problem :
    – sometimes the plugin is not loaded
    – this is always with opera on PC
    – occurs sometimes with chrome
    – others navigators not tested for now

    History :
    I had bad resizes and you give me advice to run at the end of load ($(window).load $('.pdfemb-viewer').pdfEmbedder();
    But I got sometimes crashes of js;
    Then I have added a test :
    `if (! $.isFunction($.fn.pdfEmbedder)) {
    alert (‘Warning to user about sizing pdf and access’);
    } else $(‘.pdfemb-viewer’).pdfEmbedder(); // Recommanded by pfp-embedder to force event resize when pdf-embedder elements are loaded

    When I launches the debugger (Chrome or Opera) I can see that the plugin doesn’t appear.

    With chrome and now Opera the not loaded status seems linked to the fact that the content don’t contains pdf files (no call to pdf-embedder), then if I run $('.pdfemb-viewer').pdfEmbedder(); on document which doesn’t contains pdf embedded files, with what I write I get my warning message.

    if I am right I have two solutions :

    • Suppress the comment : then if pdf-embedder is not loaded I will not get this wrong message, but if really there is sometimes a problem I will not get the message and a wrong display
    • Run the same check of content that pdf-embedder performs (what is it ?) and display the message only when there is no coherence (I can send easily a “data-*” attribute into an already existing object defined for same purposes and check it).

    Anyway the problem remains (as for others plugins) the way to check efficiently the execution context.

    Another problem is that swhich seems to be a feature of pdf-embedder (not loaded if not used) creates a problem if parts of documents containing pdf-embedded are Ajax loaded (while the plugin is not loaded).

    May be there is an option of configuration that I have not seen.

    Best regards

    Trebly

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I meet cases where pdf-embedder plugin is not loaded’ is closed to new replies.