No description
  • JavaScript 82.9%
  • Fluent 15%
  • CSS 1.1%
  • PHP 0.5%
  • HTML 0.3%
  • Other 0.2%
Find a file
github-actions[bot] bf7d5e64b9
Merge pull request #1456 from nextcloud/dependabot/npm_and_yarn/dompurify-3.4.11
chore(deps): Bump dompurify from 3.3.3 to 3.4.11
2026-07-16 09:16:47 +00:00
.github feat(deps): Add Nextcloud 35 support on master 2026-05-20 16:44:01 +02:00
.tx
appinfo feat(deps): Add Nextcloud 35 support on master 2026-05-15 11:36:22 +02:00
build-js
css
img
js chore(assets): Recompile assets 2026-07-16 08:50:15 +00:00
l10n fix(l10n): Update translations from Transifex 2026-07-14 00:56:20 +00:00
lib fix: Replace "unsafe-eval" with "wasm-unsafe-eval" in CSP 2026-04-30 11:11:15 +02:00
LICENSES chore(assets): Recompile assets 2026-03-30 18:10:32 +02:00
src fix: 1451 stop spinner once the document loaded 2026-06-11 17:30:44 +00:00
templates feat: Add UI to enable scripting in PDFs 2026-03-30 14:16:23 +02:00
tests fix: Replace "unsafe-eval" with "wasm-unsafe-eval" in CSP 2026-04-30 11:11:15 +02:00
vendor-bin/psalm ci: Bump vimeo/psalm from 5.25.0 to 6.16.1 in /vendor-bin/psalm 2026-03-31 14:06:42 +02:00
.gitignore
.l10nignore
.nextcloudignore
.php-cs-fixer.dist.php
.scrutinizer.yml
AUTHORS.md
babel.config.js chore: Add SPDX header 2024-07-01 09:37:11 +02:00
composer.json
composer.lock chore(deps-dev): Bump bamarni/composer-bin-plugin from 1.9.0 to 1.9.1 2026-02-14 02:02:55 +00:00
COPYING
eslint.config.mjs chore(performance): make the viewer component async 2026-05-22 08:14:29 +02:00
Makefile
package-lock.json chore(deps): Bump dompurify from 3.3.3 to 3.4.11 2026-07-16 10:23:32 +02:00
package.json chore(deps): Bump @nextcloud/auth from 2.5.3 to 2.6.0 2026-05-20 19:42:01 +00:00
pdfjs-get.js fix: Get PDF.js version from "package-lock.json" 2025-02-24 10:16:14 +01:00
psalm.xml
README.md
REUSE.toml
stylelint.config.js chore: Add SPDX header 2024-07-01 09:37:11 +02:00
webpack.config.js feat: Add UI to enable scripting in PDFs 2026-03-30 14:16:23 +02:00

PDF viewer for Nextcloud

REUSE status

This application integrates the PDF.js library into Nextcloud's Viewer. You can view PDF files as well as Adobe Illustrator files (.ai)

PDF viewer

Enable Javascript execution in PDF files

To allow Javascript embedded in PDF-files to be executed inside the PDF-viewer inside your browser, enable it with:

php occ config:app:set files_pdfviewer enable_scripting --value=yes

Disable:

php occ config:app:delete files_pdfviewer enable_scripting

🏗 Development setup

  1. ☁ Clone this app into the apps folder of your Nextcloud: git clone https://github.com/nextcloud/files_pdfviewer.git
  2. ☁ Clone the viewer app into the apps folder of your Nextcloud: git clone https://github.com/nextcloud/viewer.git
  3. 👩‍💻 In the folder of the files_pdfviewer app, run the command npm ci && npm run dev to install dependencies and build the Javascript.
  4. Enable the app through the app management of your Nextcloud (viewer should be enabled by default)
  5. 🎉 Partytime! Help fix some issues and review pull requests 👍

🧙 Advanced development stuff

To build the Javascript whenever you make changes, you can also use npm run build. Or npm run watch to automatically rebuild on every file save.

You run all tests by using make test.

📦 Update pdf.js

When a new release of pdf.js is available on https://github.com/mozilla/pdf.js/releases, update the version number on https://github.com/nextcloud/files_pdfviewer/blob/master/pdfjs-get.js#L8 and compile the app again.

♥ How to create a pull request

This guide will help you get started:

✌ Code of conduct

The Nextcloud community has core values that are shared between all members during conferences, hackweeks and on all interactions in online platforms including Github and forums. If you contribute, participate or interact with this community, please respect our shared values. 😌