0% found this document useful (0 votes)
203 views2 pages

PDF Unlock (Windows) : Description and Use

This document provides instructions to set up a desktop icon to unlock protected PDF files using the open source application Ghostscript. The icon runs a batch script that uses Ghostscript to remove the password from a PDF and save it as a new file with "_noPW" appended to the filename. The instructions explain how to install Ghostscript, create the batch script, add an unlock icon, and place a shortcut on the desktop so protected PDFs can be unlocked by dragging them onto the icon.

Uploaded by

Bill Ohica
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views2 pages

PDF Unlock (Windows) : Description and Use

This document provides instructions to set up a desktop icon to unlock protected PDF files using the open source application Ghostscript. The icon runs a batch script that uses Ghostscript to remove the password from a PDF and save it as a new file with "_noPW" appended to the filename. The instructions explain how to install Ghostscript, create the batch script, add an unlock icon, and place a shortcut on the desktop so protected PDFs can be unlocked by dragging them onto the icon.

Uploaded by

Bill Ohica
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PDF Unlock 

PDF Unlock (Windows)  

  Caveat:  May not work on recent files created based on the recent PDF versions and/or with 
multiple levels of security. 
Description and Use 
  This document describes how to set up a desktop icon to unlock protected PDFs.  It uses the 
opensource application “Ghostscript” which is a PDF/PS parse/convert/render engine and a 
simple command script. 
  Once installed according to the instructions below, you can drop a protected PDF file on the 
icon on the desktop and an unlocked version of the PDF will be created in the same directory 
as the original PDF file with “_noPW” appended to the filename. 
  This configuration has been tested to work with Windows 7/64 bit and Windows 10/64 bit. 
Instructions 
1.  Install Ghostscript  
  This open source applications can be downloaded at 
http://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/ 
2.  Using a text editor, create a file unlockpdf.cmd with the following content: 
  @echo off
echo.
echo.
echo This may take a minute, please wait.
echo.
setlocal enableextensions

set ttt=%~1
echo %ttt%
set tt=%ttt:~0,-4%
echo %tt%
gswin64c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -
sFONTPATH=%windir%/fonts;xfonts;. -sPDFPassword= -
dPDFSETTINGS=/prepress -dPassThroughJPEGImages=true -
sOutputFile="%tt%_noPW.pdf" %1
echo
pause
3.  Download an “unlock” icon for your desktop using google from a site providing free icons.  The 
file should be in the *.ico format.  Name this file unlock.ico 
4.  Copy the provided command script and icon file to the ghostscript installation directory: 
  Assuming a standard installation on drive C:, 
  For 32 bit: 
    copy unlockpdf32.cmd C:\Program Files (x86)\gs\gsX.XX\bin\ 
  copy unlock.ico C:\Program Files (x86)\gs\gsX.XX\bin\ 
  For 64 bit: 
    copy unlockpdf.cmd C:\Program Files\gs\gsX.XX\bin\ 

1(2) 
PDF Unlock 

  copy unlock.ico C:\Program Files\gs\gsX.XX\bin\ 
 
Note: X.XX refers to the version number which is 9.07 at this time. 
5.  Open your Windows Explorer to directory containing unlockpdf*.cmd and unlock.ico 
6.  Press and hold the "Alt" key and drag the *.cmd file to the desktop.  This will place a shortcut 
on the desktop. 
7.  Right click on the shortcut and select "Properties" 
8.  Select "Change Icon..." 
8.  In the dialog which appears, select "Browse" and go to the location which contains the 
unlock.ico file. 
  For 32 bit installations this should be:  C:\Program Files (x86)\gs\gsX.XX\bin\  
For 64 bit installations this should be:  C:\Program Files\gs\gsX.XX\bin\ 
 
Note: X.XX refers to the version number which is 9.07 at this time. 
9.  You can now unlock PDFs by dragging them over the unlock icon on your desktop. 
 

2(2) 

You might also like