• Resolved wmchugh

    (@wmchugh)


    I have a page (via my own plugin) that allows the user to select the PDF they want displayed, and AJAX is used to fetch the html to render the selected PDF. This was working 2 years ago and it is now not working.

    1. I have established that the link to the AJAX callback is working.
    2. I have established that the call to do _shortcode(pdf-embedder url=””); returns an empty string, though 2 years ago it returned the required html.
    3. Following some advice I’ve found around the internet I’ve attempted to code the implementation of the shortcode, but clearly I am doing that incorrectly. I tried:
      $pPDF = new WP_PDF_Secure();
      $atts = array(“url” => $urlPDF);
      $ajax_response = $pPDF->pdfemb_shortcode_display_pdf($atts);
      but it reports “Call to a member function pdfemb_shortcode_display_pdf() on null”, meaning pPDF isn’t being initialized properly.

    The do_shortcode call used to work, but now it does not – I presume because of changes in WordPress and/or this plugin. Does anyone know how to work around that?

Viewing 1 replies (of 1 total)
  • Hi, Wayne.

    Thanks for contacting us!

    I’m glad you submitted a support ticket through our website since you have an active license subscription. As we already replied to you in our support channel, I’m setting this thread as resolved, okay?

    Thanks, and count on us! ??

Viewing 1 replies (of 1 total)
  • The topic ‘Select and display PDF file via AJAX’ is closed to new replies.