https://github.com/nktnet1/pdfoxjs
View and edit PDF documents with customisable VIM keyboard shortcuts
https://github.com/nktnet1/pdfoxjs
pdf-annotator pdf-editor pdf-viewer pdfjs pdfjs-viewer vim
Last synced: 22 days ago
JSON representation
View and edit PDF documents with customisable VIM keyboard shortcuts
- Host: GitHub
- URL: https://github.com/nktnet1/pdfoxjs
- Owner: nktnet1
- License: mit
- Created: 2023-11-13T00:27:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-05T13:44:00.000Z (12 months ago)
- Last Synced: 2025-03-30T14:25:45.709Z (about 2 months ago)
- Topics: pdf-annotator, pdf-editor, pdf-viewer, pdfjs, pdfjs-viewer, vim
- Language: JavaScript
- Homepage:
- Size: 6.54 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pdfoxjs
> View and edit PDF documents with customisable VIM keyboard shortcuts
Cross-platform electron wrapper around Mozilla's [pdf.js](https://mozilla.github.io/pdf.js).
Support features present in the [pdf.js v4.0.189](https://github.com/mozilla/pdf.js/releases/tag/v4.0.189) release.
## Installation
See the latest release at
- https://github.com/nktnet1/pdfoxjs/releases/latest| Operating System | File Extension | Example (vX.X.X) |
|-|-|-|
| Linux | AppImage | pdfoxjs-X.X.X.AppImage |
| MacOS | dmg | pdfoxjs-X.X.X.dmg |
| Windows | exe | pdfoxjs-Setup-X.X.X.exe |## Features
Please refer to the original documentation of [pdf.js](https://github.com/mozilla/pdf.js). There is also a demo for modern browsers released by Mozilla [here](https://mozilla.github.io/pdf.js/web/viewer.html).

### Toolbar
- Toggle Sidebar
- Find in Document (Search)
- Page Selection
- Zoom
- Open File
- Save (Download)
- This Includes Text, Drawing/Annotation, Filled Form Inputs, and Inserted Images
- Page Rotations Are Not Saved
- Insert Text
- Draw (Annotate)
- Add/Edit Images
- Tools
- Presentation Mode
- Go to First Page
- Go to Last Page
- Rotate Clockwise
- Rotate Counterclockwise
- Text Selection Tool
- Hand Selection Tool
- Page Scrolling
- Vertically Scrolling
- Horizontal Scrolling
- Wrapped Scrolling
- No Spread
- Odd Spread
- Even Spread### Sidebar
- Show Thumbnails
- Show Document Outline
- Show Attachments
- Show Layers### Viewer
- Select Text
- Copy
- Search with Google
- Inspect (only in development mode)
- Open Links (will open a new tab in your default browser)
- Fill Forms
- `` and `` to navigate forward and backward between form inputs
- `` inside checkbox to toggle selection
- `` in multi-lines input box for new lines### Example PDF
The file [public/demo.pdf](public/demo.pdf) is a good playground to showcase the features from the viewer.
It is a merged PDF from the following sources:
- Form: https://royalegroupnyc.com/wp-content/uploads/seating_areas/sample_pdf.pdf
- Layer: https://www.pdfill.com/example/pdf_layer_new.pdf
- Attachment: https://demos.devexpress.com/OfficeFileAPI/ASP/ContentManipulation/PdfFileAttachment.aspxBy default, you can use the double quotation marks key (`"`, i.e. `SHIFT` + `'`) to load this document.
### Configuration
See [public/default.json](public/default.json) for an example configuration file. This will contain all defined functions and corresponding settings.
On the initial launch, the default configuration will be copied to the directory `userConfig/config.json`, which will be within [Electron app's userData directory](https://www.electronjs.org/docs/latest/api/app#appgetpathname).
On Linux, for a particular `username`, this could be one of:
```
/home/username/.config/pdfoxjs/userConfig/config.json
/home/username/.pdfoxjs/userConfig/config.json
```
depending on how your [XDG_CONFIG_HOME](https://wiki.archlinux.org/title/XDG_Base_Directory#User_directories) is defined.On MacOS, it will be
```
~/Library/Application Support/pdfoxjs/userConfig/config.json
```On Windows, it will be
```
%APPDATA%\pdfoxjs\userConfig\config.json
```## Project Setup (Development)
### Setup
```bash
$ yarn install
```### Development
```bash
# Transpile and run an electron app
$ yarn start# Simple express server on localhost
$ yarn dev
```### Build
```bash
# For Windows
$ yarn build:win# For MacOS
$ yarn build:mac# For Linux
$ yarn build:linux
```