Here is a GUI for pdftk, made using autohotkey, covering the basic functions. Keep it in the same directory as pdftk.exe and run it.
IfNotExist, pdftk.exe
{
MsgBox, pdftk.exe not found in same directory
ExitApp
}
Gui, Add, Radio, vOpt, Decrypt PDF file (password should be known)
Gui, Add, Radio, , Encrypt PDF file 128 bit, withhold all permissions
Gui, Add, Radio, , Encrypt PDF file 128 bit, allow printing, `nwithhold other permissions
Gui, Add, Radio, , Encrypt PDF file 128 bit, user needs password to open, `nwithhold all permissions
Gui, Add, Radio, , Encrypt PDF file 128 bit, user needs password to open, `nallow printing, withhold other permissions
Gui, Add, Radio, , Join 2 unencrypted PDF files
Gui, Add, Radio, , Join all unencrypted PDF files in a folder
Gui, Add, Radio, , Remove a page from an unencrypted file
Gui, Add, Radio, , Burst an unencrypted pdf file into single pages
Gui, Add, Radio, , None of the above
Gui, Add, Radio, , About this Gui
Gui, Add, Button, ,OK
Gui, Show, x250 y150, PDF Tool Kit Graphical User Interface
Return
ButtonOK:
Gui, Submit
if Opt=1
{
FileSelectFile, arg1,,,"Choose file to decrypt",*.pdf
InputBox, foopass,,Enter Password, HIDE,
FileSelectFile, arg2,,,"Choose output file",*.pdf
RunWait, pdftk.exe %arg1% input_pw %foopass% output %arg2%.pdf
}
else if Opt=2
{
FileSelectFile, arg1,,,"Choose file to encrypt",*.pdf
InputBox, foopass,,Enter Password, HIDE,
FileSelectFile, arg2,,,"Choose output file",*.pdf
RunWait, pdftk.exe %arg1% output %arg2%.pdf owner_pw %foopass%
}
else if Opt=3
{
FileSelectFile, arg1,,,"Choose file to encrypt",*.pdf
InputBox, foopass,,Enter Password, HIDE,
FileSelectFile, arg2,,,"Choose output file",*.pdf
RunWait, pdftk.exe %arg1% output %arg2%.pdf owner_pw %foopass% allow printing
}
else if Opt=4
{
FileSelectFile, arg1,,,"Choose file to encrypt",*.pdf
InputBox, foopass,,Enter Owner Password, HIDE,
loop
{
InputBox, baz,,Enter User Password, HIDE,
If baz=%foopass%
{
MsgBox, User password should not be owner password
}
else
{
break
}
}
FileSelectFile, arg2,,,"Choose output file",*.pdf
RunWait, pdftk.exe %arg1% output %arg2%.pdf owner_pw %foopass% user_pw %baz%
}
else if Opt=5
{
FileSelectFile, arg1,,,"Choose file to encrypt",*.pdf
InputBox, foopass,,Enter Owner Password, HIDE,
loop
{
InputBox, baz,,Enter User Password, HIDE,
If baz=%foopass%
{
MsgBox, User password should not be owner password
}
else
{
break
}
}
FileSelectFile, arg2,,,"Choose output file",*.pdf
RunWait, pdftk.exe %arg1% output %arg2%.pdf owner_pw %foopass% user_pw %baz% allow printing
}
else if Opt=6
{
FileSelectFile, in1,,,"Choose first file to join",*.pdf
FileSelectFile, in2,,,"Choose second file to join",*.pdf
FileSelectFile, out1,,,"Choose output file",*.pdf
RunWait, pdftk.exe %in1% %in2% cat output %out1%.pdf
}
else if Opt=7
{
FileSelectFolder, inf,,,"Select folder containing the pdf files"
FileSelectFile, out1,,,"Choose output file",*.pdf
RunWait, pdftk.exe %inf%\*.pdf cat output %out1%.pdf
}
else if Opt=8
{
FileSelectFile, arg1,,,"Choose file from which page to be removed",*.pdf
InputBox, pr,,Give page number to be removed
FileSelectFile, out1,,,"Choose output file",*.pdf
pb=%pr%
pb-=1
pn=%pr%
pn+=1
RunWait, pdftk.exe %arg1% cat 1-%pb% %pn%-end output %out1%.pdf
}
else if Opt=9
{
FileSelectFile, in1,,,"Choose file to burst",*.pdf
RunWait, pdftk.exe %in1% burst
}
else if Opt=10
{
MsgBox, "Sorry, your requirement is not yet included"
}
else
{
MsgBox, This script developed by Dhanish`nwww.dhanish.150m.com/software.html`nFor PDF tool kit, visit http://www.accesspdf.com/pdftk/
}
GuiClose:
GuiEscape:
ExitApp
A compiled version can be downloaded from
www.dhanish.150m.com/software.html