This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

PDF Thumbnails aren’t generating

Home Forums Product Support Forums Ajax Search Pro for WordPress Support PDF Thumbnails aren’t generating

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #57302
    richardp_0PKgrichardp_0PKg
    Participant

    PDF Thumbnails aren’t generating / showing in the search results. I have verified imagemagick 6 is installed using phpinfo. No errors in php logs either!
    I also turned it on in the ajax pro search settings.

    #57305
    richardp_0PKgrichardp_0PKg
    Participant

    Screen shot of phpinfo

    #57307
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps a lot!

    I have logged in to check, and there is indeed something missing as WordPress itself should automatically generate covers for PDF documents during upload. The most likely cause is that ghostscript is not installed, it is not well documented, but WordPress needs that to generate thumbnails.

    If those thumbnails are not present, Ajax Search Pro will try alternative methods via ImageMagick, but the extension has to have access to PDF documents. It can be enabled via the policy file. Without that the script has no access to the PDF files. Correcting the policy file will very likely resolve the issue.

    #57308
    richardp_0PKgrichardp_0PKg
    Participant

    Thanks! I forgot the thumbnails are supposed to work in the wordpress media manager by default now. I had to install ghostscript on the ubuntu server and now they work in the ajax Ajax Search Pro preview while typing in the search field.

    To get them to show in the full search results page is that something I have to do in the wordpress php template file? (content-search.php)

    #57309
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are welcome!

    Correct – The results page design/layout is out of the scope of the search as it is controlled by the theme. Usually it is passed to the search.php and then whatever is required in that file, it varies for every theme. In your case it is very likely the content-search.php as you pointed out.

    To get the thumbnail URL you may have to use something like:

    wp_get_attachment_image_url( get_the_ID() );

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.