From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Max Chernoff <mseven@telus.net>
Subject: Re: PDF viewer
Date: Thu, 22 Sep 2022 18:47:50 -0600 [thread overview]
Message-ID: <47d2595c6cd444c92eea9410c57e762bd3fd737a.camel@telus.net> (raw)
In-Reply-To: <78bf8fa8-c793-b496-0b2f-961c56c9db35@fiee.net>
Hi Hraban,
> I compiled a kind of wishlist what we need or look for in a new or
> enhanced open source PDF viewer, as discussed e.g. at the 2021 meeting.
>
> https://wiki.contextgarden.net/PDF_viewer
>
> Feel free to enhance the wiki page or discuss here.
I think that pdf.js (the Firefox PDF viewer) meets most of these
requirements. There are a few requirements that it doesn't meet, but
it's open source and written in JavaScript, so we should be able to add
anything that's missing.
Going down the list on the Wiki:
> in general:
> - PDF 2.0 compatible
It can open PDF 2.0 files, but I doubt that it supports every single
feature.
> - proper color and transparency display (respect color profiles)
It supports all of the PDF colour models/profiles for vectors, although
it ignores embedded colour profiles in images.
https://github.com/mozilla/pdf.js/issues/2856
Regular RGB and CMYK stuff works fine though.
> - limited JavaScript support (no modification, no file operations)
Yes, although it is quite limited:
https://blog.mozilla.org/attack-and-defense/2021/10/14/implementing-form-filling-and-accessibility-in-the-firefox-pdf-viewer/
> - search
Yes.
> - update on file change (configurable)
Not by default in Firefox. It works fine in this extension though:
https://github.com/tomoki1207/vscode-pdfviewer
> - keyboard control for as much as possible (but also menus/menubars)
Yes
> - sidebar for bookmarks/ToC
Yes
> - SyncTeX support
Not in Firefox, although there are patches to enable it:
https://github.com/James-Yu/LaTeX-Workshop/blob/cff1a372/viewer/components/synctex.ts
https://github.com/tomoki1207/vscode-pdfviewer/blob/92fecdb8/src/pdfPreview.ts
> - accessibility (e.g. alternative text must work)
I've never used it, but it looks like there's good support:
https://blog.mozilla.org/attack-and-defense/2021/10/14/implementing-form-filling-and-accessibility-in-the-firefox-pdf-viewer/
> - access to file attachments (lower priority)
Surprisingly, yes.
> for presentations:
> - presentation mode (full screen, no visible controls, on one
> monitor/beamer of choice)
Yes.
> - JS for controlling optional content groups (OCGs, Viewer Layers)
You can toggle all the layers in the side panel. I don't think that you
can toggle via buttons or JS though.
> - inner- and inter-document links must work
Yes; however, inter-document links are sometimes limited depending for
security reasons. I'm sure that this can be configured though.
> - multimedia support at least via links (suggestion: use “plain Rich
> Media” approach with OS’ default player)
I don't think so, although I guess you could include a video file as an
attachment.
> - transition effects not necessary (but if the developer has fun
> including them, go on)
No transition effects.
> for forms:
> - fill in
Yes.
> - print documents with/without form contents
Yes.
> - same-ID fields on different pages must be synchronized
No idea.
> - custom checkmarks/radiobuttons should work & display correctly
Usually it works, sometimes it doesn't.
> - JS for calculations
Usually it works, sometimes it doesn't.
> for annotations (correction workflow; generally just nice to have):
> - similar to Adobe/Foxit Reader
Reading annotations works, but you can't modify anything.
> for development/debugging:
> - show metadata (incl. XMP), e.g. in a sidebar or dialog
You can see all the "regular" metadata, but XMP doesn't work.
> - show fonts metadata (inclusion etc.)
No.
> - show PDF Boxes (MediaBox, CropBox, TrimBox, BleedBox, ArtBox) as
> colored frames, switchable via preferences and menu (bar) item
No.
> - check for PDF/A and PDF/X compliance would be nice (integrate
> VeraPDF?)
> - FOSS license
Yes. (Apache 2.0)
> - should at least work on Windows, MacOS (preferably 10.14+), Linux
> and *BSD; iOS & Android versions would be nice
It's built in to Firefox, so it works on Windows, macOS, Linux, and the
BSDs. It should also work on mobile, although support is a little
spottier there.
> - how about (long term) support?
It should be supported as long as Firefox exists.
> - Funding
Overleaf uses pdf.js as its default PDF viewer, so they may perhaps be
willing to help.
~~~~~~~~~~
I've been using pdf.js almost exclusively for the past few years either
via Firefox or VS Code, and I've never really had any problems. The only
real issue that I've had is that it gets fairly slow with documents over
a few thousand pages long. Otherwise, it seems pretty fast and stable,
and it supports nearly every feature that I tend to need.
Since it's written in JavaScript, it should be fairly easy to modify,
and it should run on nearly everything.
-- Max
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2022-09-23 0:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 18:07 Henning Hraban Ramm via ntg-context
2022-09-23 0:47 ` Max Chernoff via ntg-context [this message]
2022-09-23 2:30 ` Alan Braslau via ntg-context
2022-09-23 7:59 ` Henning Hraban Ramm via ntg-context
2022-09-23 10:18 ` Max Chernoff via ntg-context
2022-09-23 15:56 ` Pablo Rodriguez via ntg-context
2022-09-23 15:34 ` Bruce Horrocks via ntg-context
2022-09-25 15:24 ` juh via ntg-context
2022-09-25 16:41 ` Pablo Rodriguez via ntg-context
2022-09-23 9:52 ` luigi scarso via ntg-context
2022-09-23 15:23 ` Pablo Rodriguez via ntg-context
2022-09-26 14:44 ` Willi Egger via ntg-context
2022-09-26 17:15 ` Pablo Rodriguez via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47d2595c6cd444c92eea9410c57e762bd3fd737a.camel@telus.net \
--to=ntg-context@ntg.nl \
--cc=mseven@telus.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).