drumscript.export_pdf¶
- export_pdf(score, output_path=None, **kwargs)[source]¶
Exports a generated DrumScript score object to a beautifully rendered PDF file.
This function utilizes the ReportLab engine to generate clean, vector-based sheet music optimized for standard A4 printing.
- Parameters:
score (object) – The internal score object generated by
build_score().output_path (str, optional) – The exact file path to save the PDF. Defaults to ‘drumscript.pdf’ in CWD.
- Returns:
The absolute path to the generated PDF.
- Return type:
str
Note
Because the PDF is generated using vector graphics, it can be scaled infinitely without any loss of quality or pixelation.
Example:
import drumscript as ds # Assuming `score` is a previously generated score object pdf_path = ds.export_pdf(score, output_path="./transcriptions/my_song.pdf")