Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export slides as PDF with 16:9 ratio #59

Closed
acka47 opened this issue May 2, 2020 · 8 comments
Closed

Export slides as PDF with 16:9 ratio #59

acka47 opened this issue May 2, 2020 · 8 comments
Assignees

Comments

@acka47
Copy link
Contributor

acka47 commented May 2, 2020

I had problems to export my slides in 16:9 for the KIM workshop. This issue is for documenting how I have done it.

@acka47 acka47 closed this as completed May 2, 2020
@dr0i
Copy link
Member

dr0i commented May 4, 2020

Thx for the decktape hint! Thx for the detailed explanations. Just a note - for my lightning talk no problems occured.

@acka47
Copy link
Contributor Author

acka47 commented May 26, 2023

This method does not work anymore, the slides come out wrong, with the footer included (view count etc.):

grafik

Until now I have tried these solutions for exporting slides from pad.gwdg.de:

  • The HedgeDoc CLI unfortunately does not support PDF export for slides yet. I have tried to download the slides locally with $ hedgedoc export --slides and tried the decktape command with the local files. To no surprise this does not change anything.
  • Then I have tried the solution in Export to pdf hackmdio/codimd#33 (comment) with Chromium which works a bit better, however there are some things broken with regard to images and graphics in text.
  • When I tried the same approach in Firefox it looked better, after adjusting image size for some slides it turned out well, except for the first page being blank. I added a blank first page in the markdown, and printed the PDF again. That's not perfect as well, but it hat to suffice.

@acka47 acka47 reopened this May 26, 2023
@acka47
Copy link
Contributor Author

acka47 commented May 26, 2023

Next try: use pandoc with $ pandoc https://pad.gwdg.de/p/2023-05-25-skohub@bibliocon23?print-pdf -t latex -o slides.pdf.This gives back:

pdflatex not found. Please select a different --pdf-engine or install pdflatex

This is solved by installing texlive-latex-recommended: $ sudo apt install texlive-latex-recommended. But then I get the next error:

Error producing PDF.
! LaTeX Error: File `letltxmacro.sty' not found.

This is solved by installing more than 200MB of texlive-latex-extra. Next error:

Error producing PDF.
! Package inputenc Error: Unicode character ➡ (U+27A1)
(inputenc)                not set up for use with LaTeX.

This is solved by using the --pdf-engine=xelatex option for which you need to install texlive-xetex.

Finally, this works $ pandoc --pdf-engine=xelatex https://pad.gwdg.de/p/2023-05-25-skohub@bibliocon23?print-pdf -t latex -o slides.pdf but the output is far from what we want.

I assume that how I approached to solve this problem with pandoc was somehow misguided.

@dr0i
Copy link
Member

dr0i commented May 30, 2023

I got this working with at least nvm version 20.2.0. Doing this:
nvm install v20.2.0; npm install -g decktape ( this command takes >2m without any output , noting something about a pdf library or so ( remembering that at bibliocon2023 I waited more than 8m without any notification and then canceled it) - so just wait).

dr0i added a commit that referenced this issue May 30, 2023
@acka47
Copy link
Contributor Author

acka47 commented May 30, 2023

I got this working with at least nvm version 20.2.0. Doing this:
nvm install v20.2.0; npm install -g decktape

Thanks, @dr0i . Yes, this works with slides from slides.lobid.org but unfortunately not with HedeDoc slides from pad.gwdg.de (althoug it also uses reveal.js)...

@acka47 acka47 closed this as completed Aug 18, 2023
@acka47
Copy link
Contributor Author

acka47 commented Aug 18, 2023

Thanks, @dr0i . Yes, this works with slides from slides.lobid.org but unfortunately not with HedeDoc slides from pad.gwdg.de (althoug it also uses reveal.js)...

I am happy with the approach described in #59 (comment) . The only annoying thing is that I have to add a slide before the first one and remove it later in the PDF as otherwise the title slide is made blank. For removing the first slide from the PDF I used pdftk on the command line, e.g.: $ pdftk input.pdf cat 2-82 output output.pdf, where "82" has to be set to the number of te last slide.

@acka47
Copy link
Contributor Author

acka47 commented Sep 29, 2023

Once again I ran into problems with creating a PDF from a HedgeDoc-based presentation. It's this one: https://pad.lobid.org/p/skohub@nfdi4ing-conference

This time the headings came out wrong and the logo wasn't taken over.

I've then tried another variant: as decktape created the slides with the footer (see #59 (comment)), I removed the footer in the CSS by adding:

    .footer {
        display: none;
    }

However, althuugh the text in the footer is not shown, the space is still occupied in the bottom of each slide and there are problems with emojis, e.g.:

image

@sroertgen
Copy link
Contributor

After struggling with the pandoc approach for some time I gave decktape a try. And it just worked beautifully:

decktape https://pad.lobid.org/p/skohub@nfdi4ing-conference slides.pdf

being on manjaro I just installed decktape from the AUR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants