Copy link to clipboard
Copied
Hi All,
I am using adobe search APIs to search for a team in the PDF programmatically.
I am passing search_string = "all", but it is searching 'allow' also. I want to search only keyword 'all'.
I tried with regexp, but it is throwing error: "Invalid_Input: Only string input is allowed".
I am using below code for search functionality.
document.addEventListener("adobe_dc_view_sdk.ready", function()
{
var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});
var previewFilePromise = adobeDCView.previewFile({
content: {location: {url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
metaData: {fileName: "Bodea Brochure.pdf"}
}, { enableSearchAPIs: true });
previewFilePromise.then(adobeViewer => {
adobeViewer.getAPIs().then(apis => {
apis.search(<SEARCH_STRING>)
.then(searchObject => console.log(searchObject))
.catch(error => console.log(error));
});
});
});
Kindly Help me to solve this issue. I am stuck here.
This is not supported currently in Embed API. We will add this to our feature request backlog and prioritise for future releases. Thanks for the feedback.
Copy link to clipboard
Copied
Regular expression does not work with search APIs in the current implementation. We will add this request to our product backlog. Thanks for the feedback.
Copy link to clipboard
Copied
Thanks for your response.
My need is to find exact word in PDF. For example if I search for 'all' keyword in pdf then it should not find 'allow'..
I can see this feature in Adobe reader, where we can enable 'Whole Words Only' option and it matches the exact word. Please see the attached screenshot of adobe pdf reader for your reference.
So, is there a way to find exact word in PDF via Search API.
Copy link to clipboard
Copied
This is not supported currently in Embed API. We will add this to our feature request backlog and prioritise for future releases. Thanks for the feedback.
Copy link to clipboard
Copied
Hi, any update on this issue? It's two years since this feature was requested but I'm still experiencing the same problem. It doesn't seem to be that difficult to implement.
Thanks.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now