Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Can't get good "pretty" PDF search results like your demo
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 9 months ago.
- AuthorPosts
- November 20, 2022 at 7:56 pm #40039
Love the potential of this product – it will solve a bunch of problems.
And thank you for making the price so reasonable!But how do I get search results to look like your file search results demo page?
Your page— https://ajaxsearchpro.com/file-search/
— shows thumbnails and search phrase found.Mine just shows the PDF filename of the various PDFs in the media library–
https://grapevinehistory.org/newsletters/I’ve looked over the documentation several ways and times, so clearly I’ve missed something. But I don’t know what.
Thanks for pointing me in the right direction.–Larry Groebe
November 21, 2022 at 1:24 pm #40055Hi Larry,
Thank you very much for your kind words!
Long story short, we are actually using a custom code to add thumbnail images to PDF files – so they are not automatically generated, we created them, uploaded and linked to the PDF files via a custom meta field (so it is a very annoying solution).
We hoped to add an automatic script to extract images from PDF document first pages to the current release, but it turns out it is actually not possible out of the box with WordPress and PHP.
The web server requires the ImageMagick extension and it needs to be reconfigured to work properly. We have a working code to extract thumbnails, but it requires an extra step to change the back-end ImageMagick policy file configuration – and that is problematic, because it requires root access to the server via SSH and most users do not (and should not) make changes there. Unfortunately this is the simplest possible way.The good news is, that we are going to integrate this code to the upcoming release for sure. Then a knowledge base and blog article will be created as a step by step guide on how to configure the ImageMagick on the back-end servers. This update is scheduled for the next weekend.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 21, 2022 at 3:35 pm #40060Oh…ouch…OK. I’ll look forward to a new version.
Meanwhile, I don’t really need the image as much as I do the extract of the matching text, which your example also includes. The example shows picture and title and a text excerpt surrounding the first match. How can I set matters up to show the found context?
If it’s not part of the admin interface, then is there a hook I can call to create some sort of display? I have a few lines of code that can retrieve the thumbnail image path when given a media ID. I built a tiny shortcode that displays media library PDFs that way…it would be easy to incoprorate in a function.
November 21, 2022 at 4:04 pm #40061Sorry, I forgot to mention that.
You can do that via using the media service for PDF content indexing. It will extract the text and store them on your local server, and it will be used in the results display too 🙂
Best,
Once you have activated the media service parser make sure to re-index the site, it will fetch the PDF file contents.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 21, 2022 at 4:11 pm #40062You cannot access this content.November 21, 2022 at 4:53 pm #40071Because that is a completely different license, if you check the documentation it will lead you to the Media Service license request page (it has a free tier, no need to purchase anything).
Best,
We could not merge this with the plugin licenses as it is email based and a completely different product.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 21, 2022 at 5:07 pm #40072Ahh, brilliant – that solves it. Thank you!
November 22, 2022 at 10:32 am #40081You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.