• Imagemcyzyk

    (@mcyzyk)


    This is the only PDF viewer, for remote PDFs, that has worked for me! (probably because it’s using oEmbed)

    My question is a follow up to this:

    https://wordpress.org/support/topic/is-there-any-shortcode-available-for-this-plugin/

    If there is no shortcode, can you please provide an example of how this Block might be included in a custom template?

    E.g., here is how I was attempting to use the pdfjs plugin:

    //Embed Levy Drupal PDF
    $thisLevyDrupalPDF = get_field(‘boxitem’);
    $thisLevyDrupalPDF = “https://levysheetmusic.mse.jhu.edu/sites/default/files/collection-pdfs/levy-” . str_replace(‘:’, ‘-‘, $thisLevyDrupalPDF) . “.pdf”;
    $thisLevyDrupalPDF = “[pdfjs-viewer url=” . $thisLevyDrupalPDF . ” viewer_width=600px viewer_height=700px fullscreen=true download=true print=true]”;
    echo do_shortcode($thisLevyDrupalPDF);

    How would I programatically plop calls to this Block on a custom template page?

    • This topic was modified 10 months ago by Imagemcyzyk.
Viewing 1 replies (of 1 total)
  • Plugin Author ImageAndy Fragen

    (@afragen)

    There is no shortcode. I’m not sure how to specifically insert this into a custom template, I assume as long as it executes simply adding the oEmbed or block should suffice.

Viewing 1 replies (of 1 total)

The topic ‘Shortcode? Of example how to include in custom template?’ is closed to new replies.