Rahul Gulati
Rahul Gulati

Reputation: 363

Downloading HTTPS resources of a webpage for Google Chrome extension

I'm writing an extension for Google Chrome that converts a given page to PDF. To achieve this functionality, I download the HTML of the page and pass it to an NPAPI DLL, through JavaScript, where the conversion happens and the PDF file is created.

I've implemented this functionality for pages of type http://*, but it doesn't work for pages of type https://*. I need to download the HTTPS resources (CSS, images, etc.) of that webpage and modify the HTML before passing it to the NPAPI DLL.

I couldn't find any good links that explain how it could be done for Chrome. Please give me some suggestions.

Upvotes: 0

Views: 522

Answers (1)

Wladimir Palant
Wladimir Palant

Reputation: 57651

You don't quote the error message you receive but I guess that your extension is simply not allowed to access HTTPS. Please check your manifest.json, it should list both "http://*/*" and "https://*/*" under "permissions".

Documentation: permissions in the manifest, match patterns.

Upvotes: 1

Related Questions