Why is PDF presenting using typst pdfs slow?

Hi there!

I encountered a problem with presenting typst generated PDFs with pympress or pdfpc.
I made a presentation using a touying template. When I open it with Okular, a PDF viewer, It loads fine. As soon as I open it via pympress or pdfpc skipping to the next slide is slow. It takes a few seconds. As soon as I have skipped though all slides, skipping back and forth is working fast as expected.

When I use another PDF which is not generated by typst it works fine.
Even removing the touying template does not improve the performance.

Has anybody encountered similar issues?

I haven’t encountered any issues with lecture 1 of this GitHub - zeroeightysix/tt-lectures: Source code for student lectures on dependent type theory. using pympress.

Any chances you could share the PDF? or find the slide that is causing the slowdown? In any case, I think it would be best to raise the issue with pympress as you said with Okular, it reads fine.

Hm. I also have no Issues with the given slides.
It seems to be related to the used template upb-corporate-design-slides.

You can download the Slides here.
For me there is no slowdown on a specific slide. Slow transitions are on every slide.

I can reproduce the issue, thanks!
The issue here is that rendering your images takes a long time. I am unsure of which version of Poppler is used in pympress, but I know the one in Okular (where I have no issues) is using Poppler 24.11.0 (latest) and built against Poppler 24.09.0.
I recommend compressing your images, or the final pdf using ghostscript

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

See command line - Where are ghostscript options / switches documented? - Super User for more details!

1 Like

Hi, thanks for your contribution! I’m going to move this topic to Questions; even though it started as a request to exchange experiences, it now feels to fit better there. To quote the question guidelines:

Posts that are discussions or otherwise not questions looking for help should go into the General category

Since this has ended up with providing help with the issue, I think future users will have an easier time finding this thread over there.

1 Like