SongExport
enum SongExport
Export a single Song
to a PDF
-
Load an image from the cache if found or else from an URL
Declaration
Swift
static func loadImage(source: String, fileURL: URL?) async -> NSImage?
Parameters
source
The image source as defined in the song
fileURL
The optional URL of the song file
Return Value
<#description#>
-
Export a single song to PDF
Declaration
Parameters
song
The
Song
to exportReturn Value
The song as PDF
Data
and the TOC as aTOCInfo
array
-
Declaration
Swift
static func getSongElements( song: Song, counter: PDFBuild.PageCounter ) async -> [PDFElement]
Parameters
song
The
Song
counter
The
PageCounter
classReturn Value
All the PDF elements in an array
-
Calculate the type of divider for a section
Note
If the label is empty, a spacer is returned, else a dividerDeclaration
Swift
static func labelDivider(section: Song.Section) -> PDFElement
Parameters
section
The
Section