Skip to content

Instantly share code, notes, and snippets.

@milnak
Created March 15, 2022 16:06
Show Gist options
  • Save milnak/aafdc256b38005c67691db27daec072d to your computer and use it in GitHub Desktop.
Save milnak/aafdc256b38005c67691db27daec072d to your computer and use it in GitHub Desktop.
Convert chord pro file to PDF
@ECHO OFF
SETLOCAL
for /f "tokens=1,2,*" %%a in ('reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Artifex\GPL Ghostscript\9.55.0" /ve') do set "UAC=%%c"
SET GSWIN64C=%UAC%\bin\gswin64c.exe
IF NOT EXIST "%GSWIN64C%" (
ECHO Can't find %GSWIN64C%
ECHO Download Windows 64 bit from https://ghostscript.com/releases/gsdnld.html
EXIT /B
)
IF "%~1"=="" ( ECHO Need chopro filename & EXIT /B )
REM --chord-font=FONT -C Sets chord font
REM --chord-grid-size=N -s Sets chord grid size [30]
REM --chord-grids-sorted -S Prints chord grids alphabetically
REM --chord-size=N -c Sets chord size [9]
REM --lyrics-only -l Only prints lyrics
REM --no-chord-grids -G Disables printing of chord grids
REM --no-easy-chord-grids -g Doesn't print grids for builtin "easy" chords.
REM --single-space -a Automatic single space lines without chords
REM --text-size=N -t Sets text size [12]
REM --text-font=FONT -T Sets text font
chordii.exe --no-chord-grids --page-size=letter --text-size=14 "%~1" | "%GSWIN64C%" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="%~1.pdf" -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment