Taking full page screenshot with a Chrome extension

后端 未结 4 2151
隐瞒了意图╮
隐瞒了意图╮ 2020-12-20 00:34

Is there away to capture a screenshot of the full page, including what is below the fold, in a Chrome Extension?

The captureVisibleTab seems to be limited to what is

相关标签:
4条回答
  • 2020-12-20 00:55

    Chrome 59 adds a new feature in DevTools called Capture full-size screenshot. But I don't know whether this API can be called by extensions.

    0 讨论(0)
  • 2020-12-20 01:05

    You're limited to capturing the visible page via captureVisibleTab unless you use Flash or NPAPI.

    0 讨论(0)
  • 2020-12-20 01:11

    On Macs, while not a Chrome extension, you can use the following AppleScript to automate the process found here:

    https://zapier.com/blog/full-page-screenshots-in-chrome/

    tell application "Google Chrome" to activate
      tell application "System Events"
      keystroke "i" using {option down, command down}
      delay 0.3
      keystroke "p" using {shift down, command down}
      delay 0.3
      keystroke "Full"
      delay 0.5
      key code 76
    end tell
    

    Open ScriptEditor and paste that script in. Save it as a file wherever you need it locally. When you run it by pressing play in ScriptEditor, it will automatically save a full screenshot of the active tab to your Downloads folder.

    0 讨论(0)
  • 2020-12-20 01:19

    The standard approach seems to be to scroll around the page and capture screenshots at each part and then stick them all together. The official google screen capture plugin does this, but I found it to be buggy (at least on Mac OSX), so I wrote my own full page screen capture extension.

    Source code here (relevant code in page.js and popup.js).

    0 讨论(0)
提交回复
热议问题