Git Product home page Git Product logo

nightpdf's Introduction

NightPDF

Dark Mode PDF reader

It uses Electron but my eyes dont care.

NightPDF screencast

Download Binaries

NightPDF logo

Binaries for Linux, Macos and Windows



Download on Flathub

Support tiers

  • Tier 1: Linux, guaranteed builds and guaranteed 100% functionality
  • Tier 2: Tier 2: Windows, guaranteed builds. Functionality is not guaranteed
  • Tier 3: Tier 3: Macos, builds are not guaranteed if it breaks fix is not guaranteed

Limitations

There is limited support for xfa forms, and saving forms with filled in data. This will be worked on with coming releases.

Development

Requirements

This software was developed using

  • node: v12.x
  • yarn: berry
  • Arch Linux Rolling/OpenSUSE Tumbleweed

Instructions

  1. Install dependencies
yarn
  1. Run
yarn dev

Building Release Version

  1. Install dependencies
yarn
  1. Build release
yarn dist

CLI

Usage: NightPDF [-p] [pdf]

Positionals:
  pdf, pdf  The pdf to open                                             [string]

Options:
      --help     Dark Mode PDF Reader built using Electron and PDF.js  [boolean]
      --version  Show version number                                   [boolean]
  -p, --pages    The page to open in the pdf                            [number]

Examples:
  NightPDF -p 5 pdf.pdf  Loads pdf on the 5th page

Licenses

nightpdf's People

Contributors

imgbotapp avatar lunarequest avatar zeyus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nightpdf's Issues

Missing dependency

At least on Fedora Wayland it also needs these installed (tested it in Distrobox):

mesa-libgbm
libwayland-server

Command Line

Hi,
I want to open a specific page from a PDF file in this app.

On Adobe Acrobat Reader/Pro, it's possible:

"%ProgramFiles%\Adobe\Acrobat DC\Acrobat\Acrobat.exe" /A "page=7" "C:\Program Files\Adobe\Acrobat DC\Acrobat\plug_ins\Annotations\Stamps\ENU\Standard.pdf"

Also all browser support this feature:
http://www.pdf995.com/samples/pdf.pdf#page=3.pdf

Please add this feature to this app.

[Feature Request] Browsing history

Ability to return to a previous point in book if you randomly browse through the document outline, table of contents links or a random page input. This can be a multi step history like in browsers.

Keyboard shortcuts for tab support feature.

Thank you for supporting tab.
Please add keyboard shortcuts:

Command Shortcut
Go one Tab to the Right Ctrl + Tab
Go one Tab to the Left Ctrl + Shift + Tab
New Tab Ctrl + T
Close Tab Ctrl + W
Close Tab Ctrl + F4
Go one Tab to the Right Ctrl + Page Down
Go one Tab to the Left Ctrl + Page Up
Go to Tab 1 Ctrl + 1
Go to Tab 2 Ctrl + 2
Go to Tab 3 Ctrl + 3
Go to Tab 4 Ctrl + 4
Go to Tab 5 Ctrl + 5
Go to Tab 6 Ctrl + 6
Go to Tab 7 Ctrl + 7
Go to Tab 8 Ctrl + 8
Go to Last Tab Ctrl + 9
Undo Close Tab Ctrl + Shift + T
Move Tab Left Ctrl + Shift + Page Up
Move Tab Right Ctrl + Shift + Page Down
Move Tab to start Ctrl + Shift + Home
Move Tab to end Ctrl + Shift + End

Thanks.

typos in README.MD

Here are some small typos I noticed and the correct spelling to use:

It uses Electron but my eyes dont care. -> It uses Electron but my eyes don’t care.

  • Tier 1: Linux, garunteed builds and garunteed 100% functionality -> - Tier 1: Linux, guaranteed builds and guaranteed 100% functionality

  • Tier 2: Windows, garunteed builds. Functionality is not garunteed -> - Tier 2: Windows, guaranteed builds. Functionality is not guaranteed

  • Tier 3: Macos, builds are not garunteed if it breaks fix is not garunteed. -> - Tier 3: Macos, builds are not guaranteed if it breaks fix is not guaranteed.

[Feature Request] Some elementry features

This app is providing all featues that we mostly use, but it would be more usefull if you can add few more features like -

  1. Save Custom presents for backgrounds.
  2. Context menus with features like copy, highlight, etc.
  3. Meaning lookup.
  4. Better theme support (Great if GTK4).
  5. Eraser , Undo , Redo.

Thanks for beautiful app.

Open multiple books by tabs

I love this PDF viewer, I feel that the only thing missing is the ability to open multiple books by tabs inside the program, since having several minimized program windows takes up too much space on my taskbar.

Thanks for your great work man. :)

Typescript rewrite

I've found a large portion of issues related to updating electron and the such could have been fixed by using typescript. Going forward I will be moving towards using typescript in the project and rewriting all javascript to use typescript.

Have tabs like a browser

The program has one tab only. If clicking on the plus icon, it opens a new file and closes the old one.
There could be more tabs at the same time.

Fit One Full Page

Please add the feature below:

  • Fit One Full Page
    image
    In this mode, the whole page is displayed and it changes by scrolling the page.

[Bug] misplaced sliders in Custom menu on macOS

Not particularly urgent but just wanted to bring it to your attention:

On macOS the sliders in the Custom menu are offset.

Screenshot 2023-02-06 at 9 57 05 am

Genuinely a huge thank you for your work that's helping us save our eyes! 🙏🏾

Investigate downloading PDF.js at runtime.

Currently we use an inline version of PDF.js that is stored in app/libs/pdfjs by moving pdfjs outside the application instead shipping our own pdfjs version.

-- drawbacks
network access will always be required on first start up
on slow networks this could greatly increase download times.
this could also increase startup times on launch

-- possible mitigations
ship a cached pdfjs.zip(latest at time of build) and extract allowing the user to use nightpdf immediately.
produce a notification on a newer PDF.js and download only if the user requests
only check for new releases after launch asynchronously.

-- benfits
user always has the latest PDF.js version which often can include fixes and improvements
we can remove PDF.js from our direct source tree and move it elsewhere

"Original" button

Please add a button to view the original version of the documents. (light mode)

image

The reason I want to add this button is that some images may be negative:

image

fix: build on macOS

编译报错

❯ yarn dist
yarn run v1.22.19
$ electron-builder
  • electron-builder  version=22.14.13 os=22.1.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=darwin arch=x64 electron=18.2.0 appOutDir=dist/mac
  • downloading     url=https://github.com/electron/electron/releases/download/v18.2.0/electron-v18.2.0-darwin-x64.zip size=82 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v18.2.0/electron-v18.2.0-darwin-x64.zip duration=22.517s
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=     0 identities found
                                                Valid identities only
     0 valid identities found
  • building        target=macOS zip arch=x64 file=dist/NightPDF-0.4.1-mac.zip
  • building        target=DMG arch=x64 file=dist/NightPDF-0.4.1.dmg
  • building block map  blockMapFile=dist/NightPDF-0.4.1-mac.zip.blockmap
  ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Applications/Opensource/NightPDF/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:410:5)
    at ChildProcess.errorhandler (node:child_process:422:5)
    at ChildProcess.emit (node:events:513:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

通过日志定位问题 Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT

可能新的 macOS 内置 python 版本换到了 python3

安装 python2 尝试构建

踩坑后找到解决方案,节约时间踩坑过程就不列了
(比如 Poetry 不支持 python 2.7,在其项目 issue 讨论区得到结论确认)

❯ brew install kamilturek/python2/python@2 && brew install python@2
# find path by 
# brew info python@2export PYTHON_PATH=/usr/local/Cellar/python@2/2.7.18/bin/python

# build success
❯ yarn dist
yarn run v1.22.19
$ electron-builder
  • electron-builder  version=22.14.13 os=22.1.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=darwin arch=x64 electron=18.2.0 appOutDir=dist/mac
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=     0 identities found
                                                Valid identities only
     0 valid identities found
  • building        target=macOS zip arch=x64 file=dist/NightPDF-0.4.1-mac.zip
  • building        target=DMG arch=x64 file=dist/NightPDF-0.4.1.dmg
  • building block map  blockMapFile=dist/NightPDF-0.4.1.dmg.blockmap
  • building block map  blockMapFile=dist/NightPDF-0.4.1-mac.zip.blockmap
✨  Done in 32.68s.

构建产物🔗

Notion Upload Link

NightPDF-0.4.1.dmg.blockmap

NightPDF-0.4.1.dmg

OSS Link

NightPDF-0.4.1.dmg

NightPDF-0.4.1.dmg.blockmap

Page Post on my blog

Capitalize app name

Hi, please capitalize the app name. (on Ubuntu Linux)

NightPdf -> NightPDF

Screenshot from 2023-06-09 13-27-10

Add "About" item

Please add the "About" item to the Help menu.

image

Now I can't see the installed version.

This feature is on all apps for example VS Code.

image

image

Enable contextisolation

currently we have to disable contextisolation for NightPDF to work, this is a massive security issue. we have to figure out why nightpdf breaks.

Doesn't open files with double-klick

Hello,
Fedora silverblue v38. Installed NightPdf from flathub.
PDF files doesn't open with double-kick. I have to use the the file-menu->open dialog.
It seems like a bug.

thx

Fix tabs titles

There is a small bug in the tabs titles.

The file name is "03. DevOps.pdf"

image

But in tab displayed: "DevOps.pdf .03"

image

Improve the app icon

Hi, please improve the app icon.
To do this, open the icon with the Greenfish Icon Editor Pro app on Linux or Windows.

  1. As you can see, the icons are sorted in ascending order, that is, the smallest icon is at the top of the list and the largest icon is at the bottom of the list. This may seem trivial at first glance, but there is a bug in Windows that sometimes uses the first icon in the ICO file, regardless of the size of the icons, and this causes a small icon to be enlarged and finally, the poor-quality icon will be displayed.
    So the icons should be arranged in descending order.
    image

  2. A Windows icon should include the following sizes:
    256x256, 64x64, 48x48, 40x40, 32x32, 24x24, 20x20, and 16x16
    (All default Windows icons follow this rule)
    You have put sizes 192x192, 128x128, and 96x96 in your icon, which is useless, and you have not put sizes 16x16, 20x20, 24x24, 32x32, and 40x40, which are used in Windows.
    image

Instead of creating an issue, I wanted to create a PR but I couldn't find the SVG icon (the mipmap should be created from a vector file, not just a resized picture)

(Sorry for my bad English)
Thanks. 🙏

Add version on help

I did notice it missing that info when going to report another issue.

Likely not relevant right now since many will use flatpak, but it will be good for posterity if people can specify the version on "help" or when the software opens.

Either way, it is a great project, I cannot thank you enough.

Windows 11 preventing NightPDF from running

I found this interesting software simple to be an alternative to Xodo Reader, however Windows identified the file as "suspicious" I know this is not true, I managed to install it, but unfortunately I can't open it, is there any solution for this?

And in case of doubt, I downloaded the file from here and not from anywhere else, but the first page I went to was this one here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.