4 Replies Latest reply on Sep 15, 2015 1:40 AM by Test Screen Name

    How to jump to a specific text/string

    HUOBU

      Hi,

       

      we are currently developing an app (iOS and Android) containing multiple PDFs. Using simple buttons we want to link to a specific text passage inside a PDF. All PDFs have the same structure, for example the headline "2. Example headline" exists in each PDF. But now the tricky part: Due to legal issues we are not allowed to change the PDFs. Therefore we are not allowed to add markers or suchlike.

       

      So my question is:

      Is there a way, preferably with little effort, to open a PDF -> search for a text/string, e.g. "2. Example headline" and jump right to it? Also, is it possible to change also the zoom factor?

       

      I already tried this using simple HTML <a>-tags but with no success.

       

      Many thanks in advance!

       

      Lars

        • 1. Re: How to jump to a specific text/string
          gkaiseril MVP & Adobe Community Professional


          I do not think HTML tags will work in a PDF file it is not discussed within the documentation for the PDF standard.

           

          Have you been able to get the documents to work on full computer and not a mobile device?

           

          Do you want structures are available within the PDF?

           

          I would look to see if there are articles or bookmarks you could reference.

           

          Have you looked at the limited JavaScript available to mobile PDF readers to see what navigation scripting is available to you?

           

          If you cannot modify the referenced PDF do have any idea on how to return to your control app?

          • 2. Re: How to jump to a specific text/string
            Test Screen Name Most Valuable Participant

            You say you are not allowed to change the PDFs. But do you mean you are not allowed to change the visible page, or that you must distribute unmodified files? If it is the second, I can't see how you could add a button (even if that would work) or any other kind of navigation or script - these go inside the file.

            • 3. Re: How to jump to a specific text/string
              HUOBU Level 1

              Unfortunately we are not allowed to modify the file in any way. The button should not be included in the PDF file. The sequence is the following:

              1) There is a page with a button

              2) The click on the button opens the PDF and navigates to a defined paragraph (e.g. to the headline "2. Example headline").

              The PDFs we use do not have any bookmarks or references of some kind included.

              So the solution has to be something that does not change the PDF but rather navigates to a certain page/paragraph of the PDF.

              Has anyone an idea?

              • 4. Re: How to jump to a specific text/string
                Test Screen Name Most Valuable Participant

                Ok, I imagine you will be writing an app and using the built-in APIs to display a PDF. These are part of Android/iOS and not any Adobe API, and will have quite different facilities and interfaces. They might display a live PDF with navigation or they might just display a static image of a page region, with you providing navigation/zooming etc. Or you might have a choice. Perhaps these platforms have APIs for text extraction by page, which can be used to search. Perhaps they even have a direct API to find text and display. Anyway,  if you are writing an app, you need to now examine what the platform APIs offer.