Copy link to clipboard
Copied
If you are performing a search on a collection of pdf files is there a tag that will either highlight or bold the search term within the pdf?
Copy link to clipboard
Copied
If you mean bolding it when outputting a list of serach results, these links may help:
Term highlighting - ColdFusion English Documentation - Adobe Learning Resources
cfsearch - ColdFusion English Documentation - Adobe Learning Resources - pay attention to the attributes "contextHighlightBegin" and "contextHighlightEnd".
If you are talking about actually modifying the PDF file itself on-demand to bold the words you searched on, I don't think so (at least not easily). Once you open a specific PDF, you could use the Find tool in Adobe Reader to find the original search terms and highlight them within the document.
-Carl V.
Copy link to clipboard
Copied
Thank you Carl and yes I am talking about actually modifying the PDF itself on-demand. The search being worked on is of newspapers that have been converted to pdf. If you do a keyword search it is too difficult to find the term in the pdf once you have it. This is a search tool to be used in a reference room by the general public so not the most sophisticated users. We normally try to make everything as easy and user friendly as possible so the solution of opening the pdf and then highlighting the term seems a bit more than they will be able to accomplish. I thought since both programs were Adobe perhaps this was something they had fixed. Thanks you so much for your help and if you think of anything else it would be greatly appreciated.
Copy link to clipboard
Copied
While Adobe does make Acrobat and ColdFusion, ColdFusion does not use Acrobat internals to do it's PDF stuff (at least it didn't up through CF10). It uses some open-source libraries for PDF manipulation, although there may be some proprietary stuff mixed in there.
I took a quick look at what <CFPDF> can do, and it doesn't look like it can add formatting to existing text (it's mostly adding watermarks, combining PDFs, adding/removing headers/footers, page numbering, etc.). I don't see any way to do this from within ColdFusion. You might do a Google search for command-line or other tools that can manipulate PDFs in the manner you desire, then conceivably use those tools from a <CFEXECUTE> call.
-Carl V.