Table of Contents
This is an example of app.py
being used to open the demo.pdf
file.
- Python
- CustomTinter
- PyMuPdf
- Pillow
- Requests
- PyCryptodome
- Flask (optional, used only for the Public Key server)
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Begin by downloading the Python programming language from python.org, and make sure to include PIP in the installation process.
- CustomTkinter
pip install customtkinter
- Pillow
pip install pillow
- PyMuPDF
pip install pymupdf
- Requests
pip install requests
- PyCryptodome
pip install pycryptodome
- Flask (optional, used only for the Public Key server)
pip install flask
-
Download all
.py
files in this repository as well as thesettings.json
file. -
Configure application settings in
settings.json
to your liking:app_max_zoom_scale
(Default 2 = 200% maximum zoom)ask_save_before_exit
(Default True = pop-up on exit if unsaved changes have been made)allow_keyboard_events
(Default True = enable keyboard shortcuts within the application)
Start the app as follows:
- Run the
app.py
file from the command line, your IDE of choice, or simply by opening the file with Python. - The app will launch File Explorer, use it to select a PDF file to open.
Once a PDF file is selected, you will see the following user interface sections (visible in demo above):
- Menu:
- Select submenu.
- Navigate through a PDF's pages.
- Save the open PDF file.
- Open a PDF file.
- Create a new blank PDF.
- Close the open PDF file.
- Adjust the page zoom.
- View the page number.
- Submenu:
- Button #1
- Button #2
- Button #3
- Button #4
- File Selection Menu:
- Each open PDF file's name is shown, with a leading "*" indicating unsaved changes and a trailing "|" and number indicating a file with the same name as another that is open already.
- PDF viewer:
- Page render
- Scrollbars
The following submenus are available, with different actions for each of the four (4) submenu buttons:
- Pages:
- Move page up
- Move page down
- Rotate Left
- Rotate Right
- Encrypt & Compress:
- Set PDF encryption
- Remove PDF encryption
- Compress PDF (basic)
- Compress PDF (maximum)
- Insert:
- Insert PDF
- Insert Blank
- Watermark Page
- Watermake Document
- Extract:
- Delete Page
- Extract Text
- Extract Images
- Screenshot Page
- Meta Data:
- Set Author
- Set Title
- Set Subject
- Add Keywords
- Signatures
- Sign PDF
- Verify Signature
- Add Signer Account
- Set Signer Account
Unless disabled in settings.json, the following keyboard shortcuts are available in the application. Please note: most of these are only available when a PDF is open.
- Control-o: Open a new PDF file.
- Control-w: Close the open PDF file.
- Control-n: Create a new blank PDF.
- Control-s: Save the open PDF file.
- Right arrow: Navigate to the next page in the PDF file.
- Left arrow: Navigate to the prior page in the PDF file.
- Control-plus (Ctrl+): Increase Zoom by 25%.
- Control-minus (Ctrl-): Decrease Zoom by 25%.
- Add license agreement screen on first use. (Completed v1.1)
- Create update-checker on startup. (Completed v1.1)
- Allow user-created metadata. (Completed v1.2)
- Add metadata configuration submenu.
- Add optional metadata to
save_pdf()
insave.py
.
- Add md5 or SHA hash of source code to
settings.json
. (Completed v1.3) - Add file tampering checker utility application. (Completed v1.3)
- Add page rotation feature. (Completed v1.4)
- Add watermark feature. (Completed v1.4)
- Add digital signature creation and verification systsm.
- Add a "red pen markup" feature to draw on PDF pages.
- Add functionality for multiple PDF files at once.
- Add functionality to create a new PDF from a blank page.
- Manipulate links within a PDF.
- Create a "Redact" feature.
- Allow user-adjusted keybinds.
- Add PDF to DOCX file conversion.
See the open issues to add to the list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
Distributed under the MIT License. See LICENSE.txt
for more information.
Joseph Lefkovitz - GitHub - LinkedIn
Project Link: https://github.com/lefkovitzj/PyPdfApp
- PyMuPDF, which was used in all the under-the-hood PDF manipulation and access functions.
- CustomTkinter, which was used to create most of the modern user interface elements.
- Pillow, which was used in the PDF page rendering process.
- PyCryptodome, which was used in the PDF signature functions.
- Requests, which was used in the update launcher process.
- Flask, which was used for the PDF signer account public key.
- othneildrew's Best-README-Template, which was used in a modified form for this project's
README.md
file.