JoKneeMo / pdf-web-edit

Manipulate PDF files in the browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDF Web Edit

PDF Web Edit is a web-based application for manipulating PDF files. It's main purpose is to pre-process documents before they are imported into a Document Management System (DMS) such as Paperless (-ng and -ngx) or stored in a directory based strucutre.

πŸš€ Features

βœ”οΈ List all PDF documents in a directory
βœ”οΈ Search by document names
βœ”οΈ Sort by name, creation and modified date
βœ”οΈ Preview pages
βœ”οΈ Delete pages
βœ”οΈ Rotate pages
βœ”οΈ Reorder pages
βœ”οΈ Split pages
βœ”οΈ Merge pages
βœ”οΈ Multi-select for quick manipulation
βœ”οΈ Delete document
βœ”οΈ Unlock encrypted/password protected documents
βœ”οΈ Batch actions (Save, Save As, Archive, etc)
βœ”οΈ Move documents to outbox directory
βœ”οΈ Multilingual support
βœ”οΈ Dark mode

πŸ”¨ Built With

.Net Angular

πŸ“· Screenshots

Light Dark

🚦 Getting Started

The application works on the assumption that all your documents are pushed into an inbox folder ready for processing. Documents could come from a variety of sources such as a network scanner or another tool doing other pre-processing (e.g. OCR).

The user can then process those files through the web-based user interface. You can manipulate a file (e.g. rotate a page, remove blank pages or reorder pages) before saving, or deleting the document. Any modifications that you make are copied into an edited version of the original document (thus not making any changes to the original). This allows us to undo/restore the original document if a page is accidentally removed or file corruption occurs.

Saving the document will move the file from the inbox folder into the outbox folder. Whilst deleting a document will move it into the archive folder (this behaviour is configurable in the conf.json file if you would prefer to permanently delete the file rather than move it to the archive directory).

πŸ“ Important Paths

  1. Inbox - Directory where files are put ready to be processed.
  2. Outbox - Directory where files are moved to after the user presses save.
  3. Archive - Directory where files that are deleted are moved to.
  4. Config - Directory where the conf.json file of user configuration options is stored.

▢️ Running the Application

Whilst you could build this project and drop the files into an IIS application, the simplest method is using Docker.

πŸ‹ Docker

  1. Pull the image:
docker pull lbrowning/pdf-web-edit
  1. Run a container (replacing the host paths with your desired paths):
docker run -p 10000:80 -v /host/config:/config -v /host/inbox:/inbox -v /host/outbox:/outbox -v /host/archive:/archive lbrowning/pdf-web-edit:latest

Congratulations, PDF Web Edit should now be running on port 10000!

πŸ”§ Configuration

A configuration file named conf.json is created in the Config directory on first launch. You can edit the config through the web based interface (cog on the right hand side of the navigation) or you can be modify the config file to change any settings.

Please note: if you edit the config file manually the application must be restarted for any changes to take affect!

πŸ’» Development

PDF Web Edit has been developed using Visual Studio. If you would like to run the project yourself follow these simple steps;

πŸ”” Prerequisites

  • Node.js (I'm using v14.15.4 currently)
  • Visual Studio 2022

πŸ› Run the code

  1. Download the code.
  2. Open the solution in Visual Studio.
  3. Edit the appsettings.Development.json to use your local paths.
  4. Restore nuget packages and node modules.
  5. Press Run!

Optionally, to build your own Docker image, make sure you have Docker Desktop installed, then right click on the Dockerfile in Visual Studio and click Build Docker Image.

πŸ’ Contributions

Contributions are very welcome! Please feel free to to fork the repository and create a pull request for any new features. Alternatively, you can also open a discussion if you would like to discuss anything to do with the project. Feature requests are also encouraged so the community can vote on the best ideas.

❀️ 3rd Party Libraries

The project uses a number of 3rd party libraries for manipulating the PDF documents;

  1. iText 7 - iText 7 is used to remove, rotate and reorder pages.
  2. docnet - docnet is used to generate previews of the pages in a document using PDFium.

About

Manipulate PDF files in the browser

License:MIT License


Languages

Language:TypeScript 56.0%Language:C# 29.3%Language:HTML 12.6%Language:SCSS 1.4%Language:JavaScript 0.6%Language:Dockerfile 0.1%