Created
June 17, 2019 12:40
-
-
Save nicholastay/744c710ed81328525dcf1810f970ea99 to your computer and use it in GitHub Desktop.
Quickly read/convert MS Office generated documents as a PDF in Windows (LibreOffice + SumatraPDF)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET OUTPUTPATH=%USERPROFILE%\Desktop | |
if exist "%OUTPUTPATH%\%~n1.pdf" goto launch | |
echo Converting to PDF, saving to defined output path... | |
cd /D "%OUTPUTPATH%" | |
soffice --convert-to pdf %1 --headless | |
:launch | |
start SumatraPDF "%OUTPUTPATH%\%~n1.pdf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment