I am new to programming. I am creating a Chrome extension, which is when clicked shows a pop-up with many categories with check boxes. If you click the checkbox, the extension will interact with web page and highlight text related to selected categories.
Now my question is how to highlight the text in pdf files when I am clicking the popup page checkbox. Or how to interact with the pdf files from Chrome extension. Please help me.
I don't believe you can. The built in PDF renderer in Chrome is just a plugin. You can see that by viewing the source of the page.
Related
I am trying to build a Chrome Extension. The only challenge here is to show an icon when some text is selected on any page and when they click on that icon it should open our extension with selected text. We are building the extension using Angular 9.
One of the extension already has this feature - Natural Reader Text to
Speech
Sample image from the extension
I searched in google but couldnot find a valid solution :(
I am using IE 11 for web development. Now in javascript, I do window.msSaveOrOpenBlob(fileBlob), a pop up shows on the button of the page with save and open option.
Now what I want to achieve is that perform click event on open so the file will be open automatically(without user click open).
Here is the case:
User click a link, it should open the associated file with whatever file reader that can open the file. PDF, will be adobe reader, word document will be opened in microsoft word.
Things still works when I click the open button from pop up. I just want to skip this manual click and do it in the code.
I've seen some webpage does this, but can't figure out myself. Need some help.
As far as I know, we can't control the "open or save" prompt using JavaScript. It is the browser behavior.
As a workaround, to the pdf file, I suggest you could try to use the pdf.js plugin to display the pdf file. To the Office documents, you could check the following article to use the Office Web Viewer to view the document.
Office Web Viewer: View Office documents in a browser
Besides, here is an article about displaying (Show) Word, Excel, PowerPoint (PPT) and PDF files in browser web page in ASP.Net, you can also refer to it.
I want to develop extension that can reload a web page by clicking on the tub.
Is it possible to add a button to the title area of a web page?
If yes
What should I add to the manifest?
Which object should I use to do so?
Unfortunately, this is not possible. The Google Chrome Extension APIs do not provide any functionality to do this... yet. As of now, your extension can only display page actions on the address bar or browser actions near it along with other extensions.
Page actions:
Browser actions:
I've been working on an extension for Google Chrome, this is my first attempt.
So far I've been able to run my extension in a new tab, but I wanted to know if there was any possibility to remove the focus from the omnibar/addressbar to some content in the tabbed window.
For Example, I'm implementing an input field or text area, and when a new tab opens, I want the blinking cursor/caret to originate in the said text area, and not the google omnibar.
Any possibility using jquery or any google chrome extension api?
I had the same problem. My solution was to use a "dummy html" file as the new page, and everything this page did was running the following JavaScript code (in an external JS file linked to from the dummy html file):
window.open("the-real-new-tab-page.html")
window.close()
I have a PDF embedded in a web page using the following code:
<object id="pdfviewer" data='test_full.pdf#page=1&toolbar=0&statusbar=0&messages=0&navpanes=0'
type='application/pdf'
width='500px'
height='350px'>
The PDF itself is set to open in full screen mode which shows no controls. The user can advance the slides by clicking on the view.
What I'd like to have is some way to trigger that click so that I can advance 2 similar PDF:s side-by-side (one for the actual slideshow and one for the speaker notes). Is this possible to do in javascript and/or jQuery? I have tried using the click()-method but it doesn't get through to the embedded PDF.
Update: Can't find any info on it, so I guess I'm out of luck and have to try a workaround. Am currently juggling 3 embeds of the same pdf (current page, next page and previous page), hiding and showing them and loading more pages as the user clicks around.
I doubt it. Allowing web page scripts to pass input events to the PDF viewer could be a security risk (since the viewer generally has access to system file dialogues via things like Save As).