-
Help Request: How to Configure Export Function?Hello Slidev community 👋 Question / ProblemI am exporting my Slidev (PNG and PDF), but the background is missing. (teal bubbles). Current Situation
Referenced ResourcesI reviewed the following docs Desired Outcome / Expected Behavior |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
SolutionExport Slidev to PDF with backgroundslidev export --per-slide --format pdf Export Slidev to PNG with backgroundslidev export --per-slide --format png ContextSo it seems that by default, the Slidev export function does not render the background styling (PNG or SVG). Big Thanks to 0phoffThank you @0phoff for pointing out that Slidev's export has more options than specified in the https://sli.dev/ Appendix - Slidev Export Options❯ slidev export --help
slidev export [entry..]
Export slides to PDF
Positionals:
entry path to the slides markdown entry [array] [default: "slides.md"]
Options:
-t, --theme override theme [string]
--output path to the output [string]
--format output format [string] [choices: "pdf", "png", "md"]
--timeout timeout for rendering the print page [number]
--range page ranges to export, for example "1,4-5,6" [string]
--dark export as dark theme [boolean]
-c, --with-clicks export pages for every clicks [boolean]
--executable-path executable to override playwright bundled browser
[string]
--with-toc export pages with outline [boolean]
--per-slide slide slides slide by slide. Works better with global
components, but will break cross slide links and TOC in
PDF [boolean]
-h, --help Show help [boolean]
-v, --version Show version number [boolean] |
Beta Was this translation helpful? Give feedback.
Solution
Export Slidev to PDF with background
slidev export --per-slide --format pdf
Export Slidev to PNG with background
slidev export --per-slide --format png
Context
So it seems that by default, the Slidev export function does not render the background styling (PNG or SVG).
So then, by using the
--per-slide
option, slides are rendered individually and include all information.Big Thanks to 0phoff
Thank you @0phoff for pointing out that Slidev's export has more options than specified in the https://sli.dev/
Appendix - Slidev Export Options