slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
32.78k stars 1.32k forks source link

Inconsistent behavior between browser and PDF export #1860

Closed NN708 closed 2 weeks ago

NN708 commented 2 weeks ago

Describe the bug

When creating a slide full of content using slidev-theme-neversink, the content is visible in the browser but disappears when exported to a PDF file.

Minimal reproduction

  1. Create a slides.md file with the following content:

    ---
    theme: neversink
    layout: top-title-two-cols
    color: amber
    ---
    
    :: title ::
    
    # Slide 1
    
    :: left ::
    
    + Slide 1
    + Slide 1
    + Slide 1
    + Slide 1
    + Slide 1
    + Slide 1
    + Slide 1
    + Slide 1
    + Slide 1
    + Slide 1
    
    :: right ::
    
    + Slide 1
    
    ---
    layout: top-title
    color: amber
    ---
    
    :: title ::
    
    # Slide 2
    
    :: content ::
    
    Slide 2
  2. Run the command slidev export.

  3. Open the generated file slides-export.pdf.

slides-export

Environment

KermanX commented 2 weeks ago

Maybe adding some wait times (https://sli.dev/guide/exporting#wait) will solve this

NN708 commented 2 weeks ago

Maybe adding some wait times (https://sli.dev/guide/exporting#wait) will solve this

Thanks for your suggestion. I tried adding --wait 10000, but unfortunately, it didn't resolve the issue.

Additionally, I noticed that the content exports correctly with --format pptx or --format png, but the issue persists with the PDF format.

KermanX commented 2 weeks ago

slidev --export --per-slide works. Closing this issue because the problem seems to be in the theme.

gureckis commented 2 days ago

yes it is the theme probably