PDF.js adapted for the Helium Browser as a browser component.
Chromium's PDF viewer sucks and is very difficult to build on top of, but we want to have a good PDF viewing experience in our browser.
Instead of reinventing the wheel, we use the work of talented Mozillians and fix some rough edges to make it feel at home in Helium.
This repo fetches the expected release tag, patches source files with quilt, and builds a Chromium extension ready for embedding into Helium.
We expect that you work on this extension in a UNIX environment (Linux/macOS).
Clone this repo:
git clone https://github.com/imputnet/helium-pdfjs
Go to the newly created dir:
cd helium-pdfjs
Run the initial setup script to fetch the source code, npm deps, and apply patches:
source dev.sh
pdf setup
Create a Chromium extension build:
pdf build
For basic testing, import the unpacked extension from build/chromium into
any Chromium-based web browser, such as
Helium.
Printing will not work correctly, as it's handled on browser-side, but
everything else will.
All source changes must reside in patches. The sourced environment configures
quilt, so use regular quilt commands
directly from build/src.
This repo uses the same quilt environment as the main Helium repos, but with a
single patch series at patches/series.
Load the dev environment:
source dev.sh
Go to the source tree:
cd build/src
Use quilt to create or edit a patch:
quilt new general/my-change.patch
quilt add path/to/file.js
Refresh the patch after editing:
quilt refresh
Just like PDF.js itself, this repo is licensed under the Apache License 2.0.
5 commits
Shell
100.0%
PDF.js adapted for the Helium Browser as a browser component.
Chromium's PDF viewer sucks and is very difficult to build on top of, but we want to have a good PDF viewing experience in our browser.
Instead of reinventing the wheel, we use the work of talented Mozillians and fix some rough edges to make it feel at home in Helium.
This repo fetches the expected release tag, patches source files with quilt, and builds a Chromium extension ready for embedding into Helium.
We expect that you work on this extension in a UNIX environment (Linux/macOS).
Clone this repo:
git clone https://github.com/imputnet/helium-pdfjs
Go to the newly created dir:
cd helium-pdfjs
Run the initial setup script to fetch the source code, npm deps, and apply patches:
source dev.sh
pdf setup
Create a Chromium extension build:
pdf build
For basic testing, import the unpacked extension from build/chromium into
any Chromium-based web browser, such as
Helium.
Printing will not work correctly, as it's handled on browser-side, but
everything else will.
All source changes must reside in patches. The sourced environment configures
quilt, so use regular quilt commands
directly from build/src.
This repo uses the same quilt environment as the main Helium repos, but with a
single patch series at patches/series.
Load the dev environment:
source dev.sh
Go to the source tree:
cd build/src
Use quilt to create or edit a patch:
quilt new general/my-change.patch
quilt add path/to/file.js
Refresh the patch after editing:
quilt refresh
Just like PDF.js itself, this repo is licensed under the Apache License 2.0.
5 commits
Shell
100.0%