shot-scraper icon indicating copy to clipboard operation
shot-scraper copied to clipboard

More options for `shot-scraper pdf`

Open simonw opened this issue 2 years ago • 4 comments

  • [ ] --format - one of Letter, Legal, Tabloid, Ledger, A0, A1, A2, A3, A4, A5, A6
  • [ ] --print-background - include backgrounds
  • [ ] --scale - from 0.1 to 2
  • [ ] --width - measurement with units e.g. 10cm
  • [ ] --height - ditto

Split from:

  • #24

simonw avatar Mar 12 '22 18:03 simonw

What do you think of having a "one big page" PDF mode? More like the way image screenshots work.

I built this for notebook as PDF so I could contribute that implementation if you like.

In reality it isn't a "one big page" mode but a "least number of page breaks" mode because PDF viewers have a maximum page length that works (something like 200inches).

betatim avatar Apr 25 '22 12:04 betatim

Adding --selector option would be a nice enhancement...

ocococococ avatar Oct 07 '22 16:10 ocococococ

What do you think of having a "one big page" PDF mode? More like the way image screenshots work.

LOVE this idea.

Adding --selector option would be a nice enhancement...

I'm not sure how that would work. In regular mode we use Playwright's ability to take a screenshot of just a specific element... but there isn't an equivalent option for PDFs.

I guess we could try to crop the visible page down to just that selector and then generate a PDF of the whole page somehow. Sounds tricky though!

simonw avatar Oct 07 '22 23:10 simonw