FolderExport
enum FolderExport
Export a folder with ChordPro songs to a PDF
-
Convert ChordPro files to a PDF
Declaration
Swift
static func content( info: PDFBuild.DocumentInfo, counter: PDFBuild.PageCounter, songDisplayOptions: Song.DisplayOptions, chordDisplayOptions: ChordDefinition.DisplayOptions, progress: @escaping (Double) -> Void ) -> Data
Parameters
info
The document info for the PDF
counter
The
PDFBuild.PageCounter
classoptions
The chord display options
progress
A closure to observe the progress of PDF creation
Return Value
The PDF as
Data
and thePageCounter
class with TOC info -
The status of the export
See moreDeclaration
Swift
enum Status
-
Export a folder with ChordPro songs
Declaration
Swift
static func export( info: PDFBuild.DocumentInfo, songDisplayOptions: Song.DisplayOptions, chordDisplayOptions: ChordDefinition.DisplayOptions ) -> AsyncThrowingStream<Status, Error>
Parameters
info
The document info for the PDF
songDisplayOptions
The song display options
chordDisplayOptions
The chord display options
Return Value
A stream with progress indication and a document when finished
-
Export a folder with ChordPro songs
Declaration
Swift
static func export( info: PDFBuild.DocumentInfo, songDisplayOptions: Song.DisplayOptions, chordDisplayOptions: ChordDefinition.DisplayOptions, progress: @escaping (Double) -> Void ) async throws -> Data?
Parameters
info
The document info for the PDF
songDisplayOptions
The song display options
chordDisplayOptions
The chord display options
progress
A closure to observe the progress of PDF creation
Return Value
A PDFDocument if all well, else an error
-
Get all ChordPro songs from a specific folder
Declaration
Swift
static func files() throws -> [FileBrowser.SongItem]
Return Value
All found songs in a
SongItem
array -
Create a Table of Contents
Declaration
Parameters
info
The document info for the PDF
tocItems
The items for the TOC
Return Value
The Table of Contents as
Data