astefanutti / decktape

PDF exporter for HTML presentations
MIT License
2.19k stars 176 forks source link

--slides option under remark plugin still exports all content #213

Closed johncolby closed 10 months ago

johncolby commented 4 years ago

Using the remark.js plugin, the --slides 1 option exports a single pdf page, as expected. However, the content from ALL the slides still gets included. Although hidden, it can still be extracted with the right tool, and still contributes to overall file size. Maybe this is unavoidable behavior given remark's design?

A workaround would be to use the --screenshots option to save an image instead of pdf, but of course then you lose vector graphics/text, hyperlinks, etc..

Another workaround would be to save a copy of the presentation with only the slides you want, prior to running decktape.

astefanutti commented 4 years ago

I've just tried with the official Remark presentation, and can't seem to replicate the issue, e.g.:

$ decktape https://remarkjs.com/ test.pdf --slides 1

exports a PDF that's 17KB, as opposed to 143KB for the whole presentation.

Could you please provide the exact command you run, as well as Decktape version? Also if you are able to share your presentation, that may help reproducing the issue.

johncolby commented 4 years ago

Antonin, thanks for the awesome tool! This is a very useful clue that it works ok with the basic remark slideshow. I am using a presentation I made through xaringan (i.e. Rmd -> md ->...). Command was:

❯ decktape -s 1920x1080 --slides 1 remark http://johncolby.github.io/asnr2020 asnr2020title.pdf --chrome-arg=--disable-web-security
Loading page http://johncolby.github.io/asnr2020 ...
Mixed Content: The page at 'https://johncolby.github.io/asnr2020/#1' was loaded over HTTPS, but requested an insecure resource 'http://localhost:5001/'. This request has been blocked; the content must be served over HTTPS.
Loading page finished with status: 200
Remark JS plugin activated
Printing slide #1       ( 1/23) ...
Printed 1 slides

I am using decktape 2.10.0, which definitely could also be an issue. (the new 3.0 renderer gave me an error but I didn't have time to debug.)

Let me try with a more basic xaringan presentation, which will hopefully work fine with the 3.0 version. Seems likely the issue may be some combination of those?

astefanutti commented 2 years ago

Sorry for the late reply. This felt off my radar. Do you still face the issue with Decktape 3.x?

astefanutti commented 10 months ago

That doesn't seem to be an issue anymore. Let me close this. Feel free to re-open if needed.