-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce60da8
commit 0c9eba6
Showing
6 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ pending | |
logs | ||
showurl/ip.js | ||
printmodule/ps/acrodist.location | ||
printmodule/pdf/acrobat.location | ||
测试文件白银癌症晚期.txt |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PDFtoPrinter |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cls | ||
echo PDF格式打印配置工具 | ||
if exist config\pdf-backend ( | ||
set /p backend=< config\pdf-backend | ||
) else ( | ||
set backend=PDFtoPrinter | ||
echo PDFtoPrinter > config\pdf-backend | ||
) | ||
echo 当前PDF打印后端为%backend% | ||
echo [1]PDFtoPrinter(内置) | ||
echo [2]Acrobat DC Pro(需安装) | ||
set /p value=请输入你想切换的打印后端,输入无效值则保持不更改 | ||
if %value%==1 echo PDFtoPrinter > config\pdf-backend | ||
if %value%==2 echo Acrobat > config\pdf-backend | ||
echo 切换后端完成,按任意键返回 | ||
pause >nul | ||
exit /b |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,33 @@ | ||
@echo on | ||
echo PDF Print Module 1.0.0 | ||
echo PDF Print Module 1.1.0 | ||
echo Author:Qinlili | ||
echo Preparing file: %* | ||
cd %~dp0 | ||
set /p backend=< ..\..\config\pdf-backend | ||
if %backend%==Acrobat goto Acroprint | ||
echo Printing file: %* | ||
PDFtoPrinter.exe ..\..\pending\%* | ||
exit %ERRORLEVEL% | ||
exit %ERRORLEVEL% | ||
|
||
|
||
:Acroprint | ||
echo Enable Acrobat Print. | ||
if not exist acrobat.location goto find | ||
:return | ||
for /f "delims=" %%a in ('type acrobat.location') do set acrobat=%%a | ||
echo Printing file: %* | ||
%acrobat% /n /t ..\..\pending\%* | ||
exit %ERRORLEVEL% | ||
|
||
:find | ||
|
||
echo Finding Acrobat... | ||
if exist "C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Acrobat.exe" set acrobat="C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" | ||
if exist "C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" set acrobat="C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" | ||
if not defined acrobat ( | ||
echo Cannot find Acrobat Distiller, did you installed Acrobat Pro DC? | ||
exit 404 | ||
) | ||
echo Found %acrobat% | ||
echo %acrobat% >acrobat.location | ||
goto return |