You need to sign in to do that
Don't have an account?
Sandeep Kumar Singh
I wan to search keywords in pdf stored in Content Apex Class
How can i read keywords or pdf content in Apex Class, i have stored pdf in salesforce Content.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I recommend reviewing the below links https://salesforce.stackexchange.com/questions/51921/search-text-in-a-pdf-file-attachments
https://salesforce.stackexchange.com/questions/146909/can-we-programatically-search-in-files-for-particular-keywords
https://github.com/pranayjswl007/ApexFileSearcher
If it helps please mark this answer as best so that others facing the same issue will find this information useful. Thank you
As far as I know, it is not possible to do a reliable search in a PDF attachment.
See this post to learn more
Let me know if it helps
@Anudeep I tried this this is not working too getting error System.StringException: BLOB is not a valid UTF-8 string
Thanks for help
A PDF consists of binary data, it is therefore not possible to do a reliable search in a PDF attachment.
Encoding the Blob to Base64 won't help either, since the result contains in no way the original content.
Your best bet would be, attaching plain text and searching its content.
Let me know if this helps, if it does, please close the query by marking it as solved. It may help others in the community. Thank You!