Home > other >  Search for text embed
Search for text embed

Time:07-01

I use embed tag to display 1 pdf file, how do I make when I press Ctrl F it only searches the pdf file, not the current page. I tried searching on google but no desired result.

CodePudding user response:

You will not find a single answer on google they use two methods themselves.

Generally it should not be possible unless the embedment has control of the pdf search function, You need to understand that a binary pdf viewer embedded in a html page cannot be controlled by the html page, it can pass options like .pdf#search=words during loading. That usually works with Firefox but not Chrome derivatives, but that's as far as cross application security should allow. The best you can target is combine Page and part strings, like this:-

enter image description here

So there are frame controls to assist user in some cases, but not accessible from HTML, nor can the embed see the surrounding HTML.

A Firefox alternative secure Plugin that will ignore both external and internal PDF JavaScript's

enter image description here

Chromium Edge where there is no external control but the PDF may perhaps have scripting allowed.

enter image description here

  • Related