Exporting to PDF with Headings folded

Hey everyone, is there a way or a plugin where I can generate a PDF from a note with the headings that are currently folded in the note come also folded in the PDF?

I am using Obisidian as a note-taking system and I place my notes from my readings in a very long file. So I am looking for to have a file that can take to class with only the summary of each reading in that file without having to copy and paste them to another note.