![从文件夹中滚动浏览多个 PDF](https://linux22.com/image/1450210/%E4%BB%8E%E6%96%87%E4%BB%B6%E5%A4%B9%E4%B8%AD%E6%BB%9A%E5%8A%A8%E6%B5%8F%E8%A7%88%E5%A4%9A%E4%B8%AA%20PDF.png)
我的一个文件夹中有多个 pdf 文件 - 我想滚动浏览所有文件,以便它们看起来像一个 pdf。
将文件合并为一个文件不是一个选项,因为它应该从内部网网络服务“动态”完成。
我正在考虑类似“pdf-index”的文件,它保存每个 pdf 文件的路径,并在滚动浏览时调用数据。
导入文件并以嵌套滚动方式显示它们的 web 服务(php)也可能是一种选择。
答案1
以下是在 Windows 中运行的 autohotkey 脚本,可完成您的任务。您需要修改该程序以适合您的 pdf 文件夹和 pdf 阅读器。
;This Autohotkey program loops through pdf files in a specified folder, by pressing "f" for forward, "r" for reverse, and "x" for exit.
; You'll need the freeware autohotkey installed and to save this text file program with an .ahk extension. You will also
; need to change the pdf viewer exe files below to that of your machines own pdf reader, as well as specify the folder
;containing your pdfs.
Folder := "C:\" ; <----------------------SPECIFY FOLDER HERE CONTAINING PDF FILES IN QUOTES
FileList = ; Initialize to be blank.
FileCount := 0
Loop, %Folder%*.pdf {
FileList = %FileList%%A_LoopFileLongPath%`n
FileCount++
}
Array := StrSplit(Filelist,"`n")
FileIndex := 1
StartNewPDF:
MsgBox,,, Opening PDF File %FileIndex% of %FileCount%,0.7
FileToOpen=% Array[FileIndex]
; v---------------------------------SPECIFY PATH and *.exe FILE OF PDF READER
Run, "C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe"
"%FileToOpen%"
Input, OutputVarx, L1 ,, frx
if (OutputVarx="f")
{
FileIndex := 1 + Mod(FileIndex - 1 + 1, FileCount)
}
if (OutputVarx="r")
{
If (FileIndex=1)
FileIndex = FileCount
Else FileIndex := FileIndex - 1
}
if (OutputVarx="x")
{
; v-------------SPECIFY *.exe FILE OF YOUR PDF READER HERE
Process,Close,PDFXCview.exe
ExitApp
}
; v-------------SPECIFY *.exe FILE OF YOUR PDF READER HERE
Process,Close,PDFXCview.exe
Sleep, 100
Goto, StartNewPDF