Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

trouble with searching word (Exact match) in adobe using search API

New Here ,
Jul 30, 2021 Jul 30, 2021

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.

TOPICS
PDF Embed API , PDF Services API
2.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Aug 03, 2021 Aug 03, 2021

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.

Translate
Adobe Employee ,
Aug 02, 2021 Aug 02, 2021

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2021 Aug 02, 2021

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 03, 2021 Aug 03, 2021

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 28, 2023 Jun 28, 2023
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources