screenshot-capture icon indicating copy to clipboard operation
screenshot-capture copied to clipboard

Shortcut key to 'capture viewport' and Save Format "To Clipboard (Binary Image)" don't work on pdf URL

Open Kyokutou opened this issue 2 years ago • 1 comments
trafficstars

I commented on the Chrome extension page, but I should have opened an issue because I have github account.

Shortcut key to 'capture viewport' and Save Format "To Clipboard (Binary Image)" don't work on pdf, such as https://tdnet-pdf.kabutan.jp/20230810/140120230810539937.pdf.

Steps to reproduce:

  • Go to the extension option
  • Check the Capture Method "Capture Viewport"
  • Check Save Format "To Clipboard (Binary Image)"
  • Set Shortcut key ex. Alt + s
  • Open pdf ex. https://tdnet-pdf.kabutan.jp/20230810/140120230810539937.pdf on Chrome
  • Press Alt + s, the favicon of the extension blinks, but the image doesn't copy to the clipboard.

I am building a simple Chrome extension to copy the visible area to the clipboard with a shortcut, but the same error happens and I can't copy the image on the pdf URL though I can copy the image on the non-pdf URL.

Kyokutou avatar Aug 17 '23 14:08 Kyokutou

I have updated the documentation about this case here https://github.com/simov/screenshot-capture#caveats To capture PDF files you will have to use the crop method instead and select the entire screen area. I have not been able to get it working when the PDF document is not focused as in the case of capturing the viewport.

simov avatar Nov 21 '23 13:11 simov