export_pdf
Export a Dorico score to PDF without opening a dialog, writing the file next to the project. Choose to export the current layout or all layouts for printable output.
Instructions
Export the score to PDF unattended without opening a dialog.
Writes the file next to the .dorico project, named after the layout. This is the
unattended path. File.Export opens a modal dialog and is not usable from here.
Returns:
Result dictionary reporting whether the command was accepted.
Note:
Receiving kOK does not prove a file exists yet. Dorico runs commands on its
UI thread, so a request sent while a modal dialog is open waits in the queue
until the dialog closes. Tested against Dorico Elements 6.2.30. Check the
expected path on disk rather than trusting the return.
The all_layouts path is catalogued as untested, unlike the current-layout
path which is verified, so treat a multi-layout export as unproven and check
what actually landed. For an interchange format rather than a printable one,
use export_musicxml.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all_layouts | No | False exports the layout currently on screen through Print.ExportCurrentLayoutAsPDF. True exports every layout in the project through Print.ExportAllLayoutsAsPDF, which writes one file per layout. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||