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

access search programmatically

New Here ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

Good Morning,

 

Is is possible to access the search function in the Embed API programmatically?  I would like to seed the search term and trigger a search automatically when the document is opened.

 

Thanks.

 

TOPICS
PDF Embed API

Views

849

Translate

Translate

Report

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 , Sep 10, 2020 Sep 10, 2020

Yes, Seach API will be available very soon in Embed APIs. I am expecting it to be available as early as next month i.e. October.

Votes

Translate

Translate
Community Expert ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

At this time, there is no search API. Can you elaborate on your use case though, I think if we were to add that capability, your input would be valuable.

Votes

Translate

Translate

Report

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 ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

I would like to automatically scroll the user to a specific location within a PDF contract document: i.e. 'Section 5.2'.

 

Currently, I can do this by opening to the specific page in the PDF and then scrolling an apropriate number of pixels down that page. However, as the contract document is modified over time, the appropriate page and/or pixel scroll value will no longer be valid, but a text search for 'Section 5.2' would always get the user to the right spot so long as that text still exists.

 

If there are any other ways to jump / scroll to a specific destination with an embedded PDF, I would be interested to know.

 

Thanks  

Votes

Translate

Translate

Report

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
Community Expert ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

Ok - That's absolutely possible. We have recently gone to beta with an Extract API in the PDF Tools SDK. Extract will return a JSON object that contains the extracted text as well as the page and coordinates of that text area. You can leverage that JSON to drive an experience in the Embed API using the goToLocation API call. I'm developing a demo of exactly the use case you describe. If you contact me directly, I can show you what I have so far.

 

https://medium.com/adobetech/extract-content-structure-from-pdfs-using-ai-powered-adobe-pdf-extract-...

Votes

Translate

Translate

Report

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 ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

Hello,
I am wondering how you get an embedded pdf to open at a specific page - I have been trying to get it to work in this codepen - https://codepen.io/practicalPDF/pen/dyMzNqa but by adding ?page=2 or other number as directed in the comments doesn't seem to work.  I'd like to provide an embedded pdf of a 400 page pdf that opens at a specific page depending on the link in the embed code.

 

Your insight is appreciated.

Thanks

 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Try this url https://codepen.io/practicalPDF/pen/dyMzNqa?page=2 - It's working for me.

 

That said, the code to go to a specific page is as follows

function goToPage(previewFilePromise, pageNum) {
  previewFilePromise.then((adobeViewer) => {
    adobeViewer.getAPIs().then((apis) => {
      // Go to the page. Page numbers are 1 based.
      apis.gotoLocation(parseInt(pageNum));
    });
  });
}

Votes

Translate

Translate

Report

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 ,
Apr 20, 2021 Apr 20, 2021

Copy link to clipboard

Copied

LATEST

Oh Thank you... I understand now how it works! Very much appreciated 🙂

Votes

Translate

Translate

Report

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
Community Beginner ,
Oct 28, 2020 Oct 28, 2020

Copy link to clipboard

Copied

We also have a need for an entirely customized UI so the ability to control search entirely programatically would be great. This would hopefully include the ability to search and get back results with the location that we would jump to. If the document automatically highlights we would need a way to clear that when they are done searching. Happy to answer and more questions about our use case.

Votes

Translate

Translate

Report

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 ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

Yes, Seach API will be available very soon in Embed APIs. I am expecting it to be available as early as next month i.e. October.

Votes

Translate

Translate

Report

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
Community Expert ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

Excellent!

Votes

Translate

Translate

Report

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 ,
Oct 22, 2020 Oct 22, 2020

Copy link to clipboard

Copied

I just wanted to update that Search API is a bit delayed. I am still sure that it will be avaiable soon but don't have an ETA yet.

Votes

Translate

Translate

Report

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