Compare commits

..

No commits in common. "master" and "v0.1.1" have entirely different histories.

59 changed files with 607 additions and 12573 deletions

View file

@ -1,7 +1,5 @@
3rdparty/*
js/*
node_modules/*
js/libs/*
server/node_modules/*
server/config.js
webpack.js

View file

@ -9,11 +9,19 @@ env:
amd: true
globals:
$: false
OC: false
OCA: false
t: false
n: false
_: false
paper: false
io: false
iro: false
iroTransparencyPlugin: false
PDFViewerApplication: false
PDFViewerApplicationOptions: false
pdfjsLib: false
console: false
require: false
Buffer: false
@ -27,7 +35,6 @@ rules:
no-fallthrough: error
no-mixed-spaces-and-tabs: error
no-multiple-empty-lines: ["error", {"max": 1, "maxEOF": 1}]
no-prototype-builtins: off
no-unused-vars: off
no-use-before-define: error
padded-blocks: ["error", "never"]

View file

@ -1,34 +0,0 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Berlin
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/mozart"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Berlin
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: /
schedule:
interval: daily
- package-ecosystem: npm
directory: /server/
schedule:
interval: daily
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View file

@ -1,29 +0,0 @@
name: Build
on:
pull_request:
push:
branches:
- master
jobs:
javascript:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build

View file

@ -1,24 +0,0 @@
name: Check translations
on:
pull_request:
paths:
- "l10n/**"
push:
paths:
- "l10n/**"
schedule:
- cron: "0 2 * * SUN"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt -y update && sudo apt -y install gettext
- name: Check translations
run: make check-translations

View file

@ -1,43 +0,0 @@
name: Composer
on:
pull_request:
paths:
- '.github/workflows/composer.yml'
- 'composer.json'
- 'composer.lock'
- 'vendor-bin/**/composer.json'
- 'vendor-bin/**/composer.lock'
push:
branches:
- master
- stable*
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['7.4']
name: php${{ matrix.php-versions }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
- name: Install dependencies & build
run: composer i

View file

@ -1,75 +0,0 @@
name: Deploy to Docker Hub / GHCR
on:
pull_request:
push:
paths:
- "server/**"
branches:
- master
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
strukturag/pdfdraw
ghcr.io/strukturag/pdfdraw
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: ./server/
file: ./server/docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View file

@ -9,42 +9,22 @@ on:
jobs:
eslint:
runs-on: ubuntu-latest
container: nextcloudci/eslint:eslint-1
strategy:
matrix:
node-version: [16.x]
name: eslint
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- uses: actions/checkout@v2
- name: Lint
run: npm run lint
run: ./run-eslint.sh
stylelint:
runs-on: ubuntu-latest
container: nextcloudci/stylelint:stylelint-1
strategy:
matrix:
node-version: [16.x]
name: stylelint
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- uses: actions/checkout@v2
- name: Lint
run: npm run stylelint
run: ./run-stylelint.sh

13
.gitignore vendored
View file

@ -1,14 +1,5 @@
/node_modules
/pdfjs-*.zip
3rdparty/pdfjs/
build/
js/
lib/Vendor/
vendor/
composer.phar
server/config.js
server/docker-compose.yml
translationtool.phar
*.mo
*.po~
server/package-lock.json

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "3rdparty/php-jwt"]
path = 3rdparty/php-jwt
url = https://github.com/firebase/php-jwt.git

View file

@ -1,2 +0,0 @@
js/loader.js
js/pdfdraw.js

View file

@ -1,16 +1,7 @@
{
"extends": ["stylelint-config-standard-scss"],
"rules": {
"alpha-value-notation": null,
"color-function-notation": null,
"hue-degree-notation": null,
"indentation": null,
"media-feature-name-no-unknown": true,
"media-feature-name-no-vendor-prefix": null,
"property-no-unknown": true,
"property-no-vendor-prefix": null,
"selector-class-pattern": null,
"selector-id-pattern": null,
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-element-no-unknown": true,
"selector-type-no-unknown": true,

1
3rdparty/php-jwt vendored Submodule

@ -0,0 +1 @@
Subproject commit bac0422822b92fe7a0ed1fc7b1b633d9efa37bae

View file

@ -1,15 +0,0 @@
# Changelog
## 0.1.2 - 2020-12-14
Fixes for broken packaging.
## 0.1.1 - 2020-11-30
Updated AppStore metadata.
## 0.1.0 - 2020-11-30
First public release.

View file

@ -1,3 +1,5 @@
PDFJS_VERSION=2.0.943
app_name=pdfdraw
project_dir=$(CURDIR)/../$(app_name)
@ -8,56 +10,26 @@ sign_dir=$(build_dir)/sign
package_name=$(app_name)
cert_dir=$(HOME)/.nextcloud/certificates
POT_FILES=$(wildcard translationfiles/*/pdfdraw.po)
all: 3rdparty
all: npm build
3rdparty: pdfjs
translationtool.phar:
curl -L -o translationtool.phar https://github.com/nextcloud/docker-ci/raw/master/translations/translationtool/translationtool.phar
chmod a+x translationtool.phar
pdfjs-${PDFJS_VERSION}-dist.zip:
wget https://github.com/mozilla/pdf.js/releases/download/v${PDFJS_VERSION}/pdfjs-${PDFJS_VERSION}-dist.zip
.PHONY: pot
pot: translationtool.phar
./translationtool.phar create-pot-files
sed -i "s|$(CURDIR)/||" translationfiles/templates/pdfdraw.pot
pdfjs: pdfjs-${PDFJS_VERSION}-dist.zip
mkdir -p 3rdparty/pdfjs
unzip -qo pdfjs-${PDFJS_VERSION}-dist.zip -d 3rdparty/pdfjs
.PHONY: po
po: $(POT_FILES)
translationfiles/%/pdfdraw.po: translationtool.phar pot
msgmerge --update $@ translationfiles/templates/pdfdraw.pot
.PHONY: l10n
l10n: translationtool.phar
./translationtool.phar convert-po-files
check-translations: l10n
@out=$$(git diff l10n); \
if [ ! -z "$$out" ]; then \
echo; \
echo "Found unprocessed translations, need to update folder \"l10n\":"; \
echo; \
echo "$$out"; \
exit 1; \
fi
npm: package.json package-lock.json
npm ci
build: npm
npm run build
build: 3rdparty
clean:
rm -rf $(CURDIR)/3rdparty/pdfjs
rm -rf $(CURDIR)/js
rm -rf $(build_dir)
appstore: clean build
mkdir -p $(sign_dir)
rsync -a \
--exclude=/build \
--exclude=composer.json \
--exclude=composer.lock \
--exclude=build \
--exclude=.eslintignore \
--exclude=.eslintrc.yml \
--exclude=.git \
@ -66,18 +38,10 @@ appstore: clean build
--exclude=.gitmodules \
--exclude=Makefile \
--exclude=node_modules \
--exclude=pdfjs*.zip \
--exclude=package.json \
--exclude=package-lock.json \
--exclude=src \
--exclude=run-*lint.sh \
--exclude=.stylelintrc \
--exclude=.tx \
--exclude=.l10nignore \
--exclude=translationfiles \
--exclude=vendors*js \
--exclude=vendor \
--exclude=vendor-bin \
--exclude=webpack.js \
$(project_dir)/ \
$(sign_dir)/$(app_name)
@if [ -f $(cert_dir)/$(app_name).key ]; then \

View file

@ -66,9 +66,3 @@ will use an empty name by default (this is shown as `Anonymous` in the list).
Event handlers can listen for the `OCA\PdfDraw::getDisplayName` event and update
the `displayName` argument if they can identify the user by other means.
## Translations
Translations to other languages are done in Transifex at
https://www.transifex.com/strukturag/pdfdraw/

View file

@ -40,3 +40,10 @@ if (class_exists('\\OCP\\AppFramework\\Http\\EmptyContentSecurityPolicy')) {
\OC::$server->getCapabilitiesManager()->registerCapability(function() {
return new Capabilities();
});
if (!class_exists('\\Firebase\\JWT\\JWT')) {
require_once __DIR__ . "/../3rdparty/php-jwt/src/BeforeValidException.php";
require_once __DIR__ . "/../3rdparty/php-jwt/src/ExpiredException.php";
require_once __DIR__ . "/../3rdparty/php-jwt/src/SignatureInvalidException.php";
require_once __DIR__ . "/../3rdparty/php-jwt/src/JWT.php";
}

52
appinfo/database.xml Normal file
View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" ?>
<database>
<name>*dbname*</name>
<create>true</create>
<overwrite>false</overwrite>
<charset>utf8</charset>
<table>
<name>*dbprefix*pdfdraw_items</name>
<declaration>
<field>
<name>file_id</name>
<type>text</type>
<notnull>true</notnull>
</field>
<field>
<name>page</name>
<type>integer</type>
<notnull>true</notnull>
</field>
<field>
<name>name</name>
<type>text</type>
<notnull>true</notnull>
</field>
<field>
<name>data</name>
<type>clob</type>
<notnull>true</notnull>
</field>
<index>
<name>fileid_index</name>
<field>
<name>file_id</name>
<sorting>ascending</sorting>
</field>
</index>
<index>
<name>fileid_name_index</name>
<primary>true</primary>
<unique>true</unique>
<field>
<name>file_id</name>
<sorting>ascending</sorting>
</field>
<field>
<name>name</name>
<sorting>ascending</sorting>
</field>
</index>
</declaration>
</table>
</database>

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<info>
<id>pdfdraw</id>
<name>PDF Annotations</name>
<name>PDF annotations</name>
<summary><![CDATA[Annotate PDF documents]]></summary>
<description><![CDATA[PDF annotations for Nextcloud
@ -10,7 +10,7 @@ Annotate any PDF document collaboratively inside Nextcloud. Select "Annotate" fr
Requires a separate nodejs server running on the backend to distribute the signaling messages between clients.
The server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server).
]]></description>
<version>0.1.2</version>
<version>0.1.0</version>
<licence>agpl</licence>
<author>Joachim Bauch</author>
<category>files</category>
@ -23,7 +23,7 @@ The server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/m
<screenshot>https://raw.githubusercontent.com/strukturag/pdfdraw/master/screenshots/colorpicker.png</screenshot>
<dependencies>
<nextcloud min-version="13" max-version="23" />
<nextcloud min-version="13" max-version="20" />
</dependencies>
<settings>
<admin>OCA\Pdfdraw\Settings\Admin\Backend</admin>

View file

@ -1,63 +0,0 @@
{
"autoload-dev": {
"psr-4": {
"OCP\\": "vendor/nextcloud/ocp/OCP"
}
},
"autoload": {
"psr-4": {
"OCA\\Pdfdraw\\": "lib/"
}
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
},
"autoloader-suffix": "Pdfdraw",
"classmap-authoritative": true,
"optimize-autoloader": true,
"platform": {
"php": "7.4"
},
"sort-packages": true
},
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './lib/Vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l",
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
"post-install-cmd": [
"@composer bin all install --ansi",
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"test": "cd tests/php/ && phpunit -c phpunit.xml"
},
"require-dev": {
"nextcloud/ocp": "dev-stable25",
"roave/security-advisories": "dev-latest"
},
"require": {
"bamarni/composer-bin-plugin": "^1.8",
"firebase/php-jwt": "^6.3"
},
"extra": {
"mozart": {
"dep_namespace": "OCA\\Pdfdraw\\Vendor\\",
"dep_directory": "/lib/Vendor/",
"classmap_directory": "/lib/autoload/",
"classmap_prefix": "PDFDRAW_",
"packages": [
"firebase/php-jwt"
]
}
}
}

930
composer.lock generated
View file

@ -1,930 +0,0 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "046cd7ee3642ce27b9570575f4e1127f",
"packages": [
{
"name": "bamarni/composer-bin-plugin",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0",
"php": "^7.2.5 || ^8.0"
},
"require-dev": {
"composer/composer": "^2.0",
"ext-json": "*",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9.5",
"symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
},
"type": "composer-plugin",
"extra": {
"class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin"
},
"autoload": {
"psr-4": {
"Bamarni\\Composer\\Bin\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "No conflicts for your bin dependencies",
"keywords": [
"composer",
"conflict",
"dependency",
"executable",
"isolation",
"tool"
],
"support": {
"issues": "https://github.com/bamarni/composer-bin-plugin/issues",
"source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2"
},
"time": "2022-10-31T08:38:03+00:00"
},
{
"name": "firebase/php-jwt",
"version": "v6.10.0",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
"reference": "a49db6f0a5033aef5143295342f1c95521b075ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff",
"reference": "a49db6f0a5033aef5143295342f1c95521b075ff",
"shasum": ""
},
"require": {
"php": "^7.4||^8.0"
},
"require-dev": {
"guzzlehttp/guzzle": "^6.5||^7.4",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5",
"psr/cache": "^1.0||^2.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0"
},
"suggest": {
"ext-sodium": "Support EdDSA (Ed25519) signatures",
"paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
},
"type": "library",
"autoload": {
"psr-4": {
"Firebase\\JWT\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Neuman Vong",
"email": "neuman+pear@twilio.com",
"role": "Developer"
},
{
"name": "Anant Narayanan",
"email": "anant@php.net",
"role": "Developer"
}
],
"description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
"homepage": "https://github.com/firebase/php-jwt",
"keywords": [
"jwt",
"php"
],
"support": {
"issues": "https://github.com/firebase/php-jwt/issues",
"source": "https://github.com/firebase/php-jwt/tree/v6.10.0"
},
"time": "2023-12-01T16:26:39+00:00"
}
],
"packages-dev": [
{
"name": "nextcloud/ocp",
"version": "dev-stable25",
"source": {
"type": "git",
"url": "https://github.com/nextcloud-deps/ocp.git",
"reference": "0b2faa169ab28f80e6ca897d55415ba221cdcd63"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/0b2faa169ab28f80e6ca897d55415ba221cdcd63",
"reference": "0b2faa169ab28f80e6ca897d55415ba221cdcd63",
"shasum": ""
},
"require": {
"php": "^7.4 || ~8.0 || ~8.1",
"psr/container": "^1.1.1",
"psr/event-dispatcher": "^1.0",
"psr/log": "^1.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "26.0.0-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"AGPL-3.0-or-later"
],
"authors": [
{
"name": "Christoph Wurst",
"email": "christoph@winzerhof-wurst.at"
}
],
"description": "Composer package containing Nextcloud's public API (classes, interfaces)",
"support": {
"issues": "https://github.com/nextcloud-deps/ocp/issues",
"source": "https://github.com/nextcloud-deps/ocp/tree/stable25"
},
"time": "2023-02-15T00:39:02+00:00"
},
{
"name": "psr/container",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
"php": ">=7.4.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.2"
},
"time": "2021-11-05T16:50:12+00:00"
},
{
"name": "psr/event-dispatcher",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/event-dispatcher.git",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\EventDispatcher\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Standard interfaces for event handling.",
"keywords": [
"events",
"psr",
"psr-14"
],
"support": {
"issues": "https://github.com/php-fig/event-dispatcher/issues",
"source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
},
"time": "2019-01-08T18:20:26+00:00"
},
{
"name": "psr/log",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "roave/security-advisories",
"version": "dev-latest",
"source": {
"type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "b001be05b80bfa38fb266b30ec3108607af6ccd6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/b001be05b80bfa38fb266b30ec3108607af6ccd6",
"reference": "b001be05b80bfa38fb266b30ec3108607af6ccd6",
"shasum": ""
},
"conflict": {
"3f/pygmentize": "<1.2",
"admidio/admidio": "<4.1.9",
"adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3",
"aheinze/cockpit": "<=2.2.1",
"akaunting/akaunting": "<2.1.13",
"akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53",
"alextselegidis/easyappointments": "<1.5",
"alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1",
"amazing/media2click": ">=1,<1.3.3",
"amphp/artax": "<1.0.6|>=2,<2.0.6",
"amphp/http": "<1.0.1",
"amphp/http-client": ">=4,<4.4",
"anchorcms/anchor-cms": "<=0.12.7",
"andreapollastri/cipi": "<=3.1.15",
"apereo/phpcas": "<1.6",
"api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3",
"appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2",
"arc/web": "<3",
"area17/twill": "<1.2.5|>=2,<2.5.3",
"asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
"automad/automad": "<1.8",
"awesome-support/awesome-support": "<=6.0.7",
"aws/aws-sdk-php": ">=3,<3.2.1",
"backdrop/backdrop": "<=1.23",
"badaso/core": "<2.7",
"bagisto/bagisto": "<0.1.5",
"barrelstrength/sprout-base-email": "<1.2.7",
"barrelstrength/sprout-forms": "<3.9",
"barryvdh/laravel-translation-manager": "<0.6.2",
"barzahlen/barzahlen-php": "<2.0.1",
"baserproject/basercms": "<4.7.2",
"bassjobsen/bootstrap-3-typeahead": ">4.0.2",
"billz/raspap-webgui": "<=2.6.6",
"bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3",
"bmarshall511/wordpress_zero_spam": "<5.2.13",
"bolt/bolt": "<3.7.2",
"bolt/core": "<=4.2",
"bottelet/flarepoint": "<2.2.1",
"brightlocal/phpwhois": "<=4.2.5",
"brotkrueml/codehighlight": "<2.7",
"brotkrueml/schema": "<1.13.1|>=2,<2.5.1",
"brotkrueml/typo3-matomo-integration": "<1.3.2",
"buddypress/buddypress": "<7.2.1",
"bugsnag/bugsnag-laravel": ">=2,<2.0.2",
"bytefury/crater": "<6.0.2",
"cachethq/cachet": "<2.5.1",
"cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|= 1.3.7|>=4.1,<4.1.4",
"cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10",
"cardgate/magento2": "<2.0.33",
"cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
"cartalyst/sentry": "<=2.1.6",
"catfan/medoo": "<1.7.5",
"centreon/centreon": "<22.10-beta.1",
"cesnet/simplesamlphp-module-proxystatistics": "<3.1",
"cockpit-hq/cockpit": "<2.4.1",
"codeception/codeception": "<3.1.3|>=4,<4.1.22",
"codeigniter/framework": "<=3.0.6",
"codeigniter4/framework": "<4.2.11",
"codeigniter4/shield": "<1-beta.4|= 1.0.0-beta",
"codiad/codiad": "<=2.8.4",
"composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5",
"concrete5/concrete5": "<=9.1.3|>= 9.0.0RC1, < 9.1.3",
"concrete5/core": "<8.5.8|>=9,<9.1",
"contao-components/mediaelement": ">=2.14.2,<2.21.1",
"contao/contao": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3",
"contao/core": ">=2,<3.5.39",
"contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0",
"contao/listing-bundle": ">=4,<4.4.8",
"contao/managed-edition": "<=1.5",
"craftcms/cms": "<3.7.64|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1",
"croogo/croogo": "<3.0.7",
"cuyz/valinor": "<0.12",
"czproject/git-php": "<4.0.3",
"darylldoyle/safe-svg": "<1.9.10",
"datadog/dd-trace": ">=0.30,<0.30.2",
"david-garcia/phpwhois": "<=4.3.1",
"dbrisinajumi/d2files": "<1",
"derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3",
"derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1",
"directmailteam/direct-mail": "<5.2.4",
"doctrine/annotations": ">=1,<1.2.7",
"doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2",
"doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1",
"doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4",
"doctrine/doctrine-bundle": "<1.5.2",
"doctrine/doctrine-module": "<=0.7.1",
"doctrine/mongodb-odm": ">=1,<1.0.2",
"doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
"doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4",
"dolibarr/dolibarr": "<16|>=16.0.1,<16.0.3|= 12.0.5|>= 3.3.beta1, < 13.0.2",
"dompdf/dompdf": "<2.0.2|= 2.0.2",
"drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3",
"drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4",
"dweeves/magmi": "<=0.7.24",
"ecodev/newsletter": "<=4",
"ectouch/ectouch": "<=2.7.2",
"elefant/cms": "<1.3.13",
"elgg/elgg": "<3.3.24|>=4,<4.0.5",
"encore/laravel-admin": "<=1.8.19",
"endroid/qr-code-bundle": "<3.4.2",
"enshrined/svg-sanitize": "<0.15",
"erusev/parsedown": "<1.7.2",
"ether/logs": "<3.0.4",
"exceedone/exment": "<4.4.3|>=5,<5.0.3",
"exceedone/laravel-admin": "= 3.0.0|<2.2.3",
"ezsystems/demobundle": ">=5.4,<5.4.6.1",
"ezsystems/ez-support-tools": ">=2.2,<2.2.3",
"ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1",
"ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1",
"ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24",
"ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.29|>=2.3,<2.3.26",
"ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1",
"ezsystems/ezplatform-graphql": ">=1-rc.1,<1.0.13|>=2-beta.1,<2.3.12",
"ezsystems/ezplatform-kernel": "<1.2.5.1|>=1.3,<1.3.26",
"ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8",
"ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7",
"ezsystems/ezplatform-user": ">=1,<1.0.1",
"ezsystems/ezpublish-kernel": "<6.13.8.2|>=7,<7.5.30",
"ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1",
"ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3",
"ezsystems/repository-forms": ">=2.3,<2.3.2.1|>=2.5,<2.5.15",
"ezyang/htmlpurifier": "<4.1.1",
"facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2",
"facturascripts/facturascripts": "<=2022.8",
"feehi/cms": "<=2.1.1",
"feehi/feehicms": "<=2.1.1",
"fenom/fenom": "<=2.12.1",
"filegator/filegator": "<7.8",
"firebase/php-jwt": "<6",
"fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2",
"fixpunkt/fp-newsletter": "<1.1.1|>=2,<2.1.2|>=2.2,<3.2.6",
"flarum/core": "<1.7",
"flarum/mentions": "<1.6.3",
"flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15",
"flarum/tags": "<=0.1-beta.13",
"fluidtypo3/vhs": "<5.1.1",
"fof/byobu": ">=0.3-beta.2,<1.1.7",
"fof/upload": "<1.2.3",
"fooman/tcpdf": "<6.2.22",
"forkcms/forkcms": "<5.11.1",
"fossar/tcpdf-parser": "<6.2.22",
"francoisjacquet/rosariosis": "<10.8.2",
"frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2",
"friendsofsymfony/oauth2-php": "<1.3",
"friendsofsymfony/rest-bundle": ">=1.2,<1.2.2",
"friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
"friendsoftypo3/mediace": ">=7.6.2,<7.6.5",
"froala/wysiwyg-editor": "<3.2.7",
"froxlor/froxlor": "<2.0.13",
"fuel/core": "<1.8.1",
"funadmin/funadmin": "<=3.2",
"gaoming13/wechat-php-sdk": "<=1.10.2",
"genix/cms": "<=1.1.11",
"getgrav/grav": "<1.7.34",
"getkirby/cms": "= 3.8.0|<3.5.8.2|>=3.6,<3.6.6.2|>=3.7,<3.7.5.1",
"getkirby/panel": "<2.5.14",
"getkirby/starterkit": "<=3.7.0.2",
"gilacms/gila": "<=1.11.4",
"globalpayments/php-sdk": "<2",
"google/protobuf": "<3.15",
"gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3",
"gree/jose": "<2.2.1",
"gregwar/rst": "<1.0.3",
"grumpydictator/firefly-iii": "<5.8",
"guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5",
"guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1",
"harvesthq/chosen": "<1.8.7",
"helloxz/imgurl": "= 2.31|<=2.31",
"hillelcoren/invoice-ninja": "<5.3.35",
"himiklab/yii2-jqgrid-widget": "<1.0.8",
"hjue/justwriting": "<=1",
"hov/jobfair": "<1.0.13|>=2,<2.0.2",
"hyn/multi-tenant": ">=5.6,<5.7.2",
"ibexa/admin-ui": ">=4.2,<4.2.3",
"ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3",
"ibexa/graphql": ">=2.5,<2.5.31|>=3.3,<3.3.28|>=4.2,<4.2.3",
"ibexa/post-install": "<=1.0.4",
"icecoder/icecoder": "<=8.1",
"idno/known": "<=1.3.1",
"illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
"illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4",
"illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40",
"illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
"illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
"impresscms/impresscms": "<=1.4.3",
"in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1",
"in2code/lux": "<17.6.1|>=18,<24.0.2",
"innologi/typo3-appointments": "<2.0.6",
"intelliants/subrion": "<=4.2.1",
"islandora/islandora": ">=2,<2.4.1",
"ivankristianto/phpwhois": "<=4.3",
"jackalope/jackalope-doctrine-dbal": "<1.7.4",
"james-heinrich/getid3": "<1.9.21",
"jasig/phpcas": "<1.3.3",
"joomla/archive": "<1.1.12|>=2,<2.0.1",
"joomla/filesystem": "<1.6.2|>=2,<2.0.1",
"joomla/filter": "<1.4.4|>=2,<2.0.1",
"joomla/input": ">=2,<2.0.2",
"joomla/session": "<1.3.1",
"joyqi/hyper-down": "<=2.4.27",
"jsdecena/laracom": "<2.0.9",
"jsmitty12/phpwhois": "<5.1",
"kazist/phpwhois": "<=4.2.6",
"kelvinmo/simplexrd": "<3.1.1",
"kevinpapst/kimai2": "<1.16.7",
"kimai/kimai": "<1.1",
"kitodo/presentation": "<3.1.2",
"klaviyo/magento2-extension": ">=1,<3",
"krayin/laravel-crm": "<1.2.2",
"kreait/firebase-php": ">=3.2,<3.8.1",
"la-haute-societe/tcpdf": "<6.2.22",
"laminas/laminas-diactoros": "<2.11.1",
"laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1",
"laminas/laminas-http": "<2.14.2",
"laravel/fortify": "<1.11.1",
"laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
"laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
"latte/latte": "<2.10.8",
"lavalite/cms": "<=5.8",
"lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5",
"league/commonmark": "<0.18.3",
"league/flysystem": "<1.1.4|>=2,<2.1.1",
"lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3",
"librenms/librenms": "<22.10",
"liftkit/database": "<2.13.2",
"limesurvey/limesurvey": "<3.27.19",
"livehelperchat/livehelperchat": "<=3.91",
"livewire/livewire": ">2.2.4,<2.2.6",
"lms/routes": "<2.1.1",
"localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2",
"luyadev/yii-helpers": "<1.2.1",
"magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
"magento/magento1ce": "<1.9.4.3",
"magento/magento1ee": ">=1,<1.14.4.3",
"magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2",
"maikuolan/phpmussel": ">=1,<1.6",
"mantisbt/mantisbt": "<=2.25.5",
"marcwillmann/turn": "<0.3.3",
"matyhtf/framework": "<3.0.6",
"mautic/core": "<4.3|= 2.13.1",
"mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35",
"mediawiki/matomo": "<2.4.3",
"melisplatform/melis-asset-manager": "<5.0.1",
"melisplatform/melis-cms": "<5.0.1",
"melisplatform/melis-front": "<5.0.1",
"mezzio/mezzio-swoole": "<3.7|>=4,<4.3",
"mgallegos/laravel-jqgrid": "<=1.3",
"microweber/microweber": "<=1.3.2",
"miniorange/miniorange-saml": "<1.4.3",
"mittwald/typo3_forum": "<1.2.1",
"mobiledetect/mobiledetectlib": "<2.8.32",
"modx/revolution": "<= 2.8.3-pl|<2.8",
"mojo42/jirafeau": "<4.4",
"monolog/monolog": ">=1.8,<1.12",
"moodle/moodle": "<4.0.6|= 3.11|>=4.1-beta,<4.1.1",
"mustache/mustache": ">=2,<2.14.1",
"namshi/jose": "<2.2",
"neoan3-apps/template": "<1.1.1",
"neorazorx/facturascripts": "<2022.4",
"neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
"neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3",
"neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2",
"neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
"netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15",
"nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6",
"nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13",
"nilsteampassnet/teampass": "<3.0.0.23",
"notrinos/notrinos-erp": "<=0.7",
"noumo/easyii": "<=0.9",
"nukeviet/nukeviet": "<4.5.2",
"nystudio107/craft-seomatic": "<3.4.12",
"nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
"october/backend": "<1.1.2",
"october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469",
"october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12",
"october/rain": "<1.0.472|>=1.1,<1.1.2",
"october/system": "<1.0.476|>=1.1,<1.1.12|>=2,<2.2.34|>=3,<3.0.66",
"onelogin/php-saml": "<2.10.4",
"oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5",
"open-web-analytics/open-web-analytics": "<1.7.4",
"opencart/opencart": "<=3.0.3.7",
"openid/php-openid": "<2.3",
"openmage/magento-lts": "<19.4.22|>=20,<20.0.19",
"orchid/platform": ">=9,<9.4.4",
"oro/commerce": ">=4.1,<5.0.6",
"oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7",
"oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8",
"packbackbooks/lti-1-3-php-library": "<5",
"padraic/humbug_get_contents": "<1.1.2",
"pagarme/pagarme-php": ">=0,<3",
"pagekit/pagekit": "<=1.0.18",
"paragonie/random_compat": "<2",
"passbolt/passbolt_api": "<2.11",
"paypal/merchant-sdk-php": "<3.12",
"pear/archive_tar": "<1.4.14",
"pear/crypt_gpg": "<1.6.7",
"pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1",
"personnummer/personnummer": "<3.0.2",
"phanan/koel": "<5.1.4",
"php-mod/curl": "<2.3.2",
"phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7",
"phpmailer/phpmailer": "<6.5",
"phpmussel/phpmussel": ">=1,<1.6",
"phpmyadmin/phpmyadmin": "<5.2.1",
"phpmyfaq/phpmyfaq": "<=3.1.7",
"phpoffice/phpexcel": "<1.8",
"phpoffice/phpspreadsheet": "<1.16",
"phpseclib/phpseclib": "<2.0.31|>=3,<3.0.19",
"phpservermon/phpservermon": "<=3.5.2",
"phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3",
"phpwhois/phpwhois": "<=4.2.5",
"phpxmlrpc/extras": "<0.6.1",
"phpxmlrpc/phpxmlrpc": "<4.9.2",
"pimcore/data-hub": "<1.2.4",
"pimcore/pimcore": "<11",
"pixelfed/pixelfed": "<=0.11.4",
"pocketmine/bedrock-protocol": "<8.0.2",
"pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2",
"pressbooks/pressbooks": "<5.18",
"prestashop/autoupgrade": ">=4,<4.10.1",
"prestashop/blockwishlist": ">=2,<2.1.1",
"prestashop/contactform": ">=1.0.1,<4.3",
"prestashop/gamification": "<2.3.2",
"prestashop/prestashop": "<8.0.1",
"prestashop/productcomments": "<5.0.2",
"prestashop/ps_emailsubscription": "<2.6.1",
"prestashop/ps_facetedsearch": "<3.4.1",
"prestashop/ps_linklist": "<3.1",
"privatebin/privatebin": "<1.4",
"processwire/processwire": "<=3.0.200",
"propel/propel": ">=2-alpha.1,<=2-alpha.7",
"propel/propel1": ">=1,<=1.7.1",
"pterodactyl/panel": "<1.7",
"ptrofimov/beanstalk_console": "<1.7.14",
"pusher/pusher-php-server": "<2.2.1",
"pwweb/laravel-core": "<=0.3.6-beta",
"pyrocms/pyrocms": "<=3.9.1",
"rainlab/debugbar-plugin": "<3.1",
"rankmath/seo-by-rank-math": "<=1.0.95",
"react/http": ">=0.7,<1.7",
"remdex/livehelperchat": "<3.99",
"rmccue/requests": ">=1.6,<1.8",
"robrichards/xmlseclibs": "<3.0.4",
"roots/soil": "<4.1",
"rudloff/alltube": "<3.0.3",
"s-cart/core": "<6.9",
"s-cart/s-cart": "<6.9",
"sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1",
"sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
"scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11",
"sensiolabs/connect": "<4.2.3",
"serluck/phpwhois": "<=4.2.6",
"shopware/core": "<=6.4.18",
"shopware/platform": "<=6.4.18",
"shopware/production": "<=6.3.5.2",
"shopware/shopware": "<=5.7.14",
"shopware/storefront": "<=6.4.8.1",
"shopxo/shopxo": "<2.2.6",
"showdoc/showdoc": "<2.10.4",
"silverstripe/admin": ">=1,<1.11.3",
"silverstripe/assets": ">=1,<1.11.1",
"silverstripe/cms": "<4.11.3",
"silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1",
"silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
"silverstripe/framework": "<4.11.14",
"silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1",
"silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1",
"silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1",
"silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4",
"silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1",
"silverstripe/subsites": ">=2,<2.6.1",
"silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1",
"silverstripe/userforms": "<3",
"silverstripe/versioned-admin": ">=1,<1.11.1",
"simple-updates/phpwhois": "<=1",
"simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4",
"simplesamlphp/simplesamlphp": "<1.18.6",
"simplesamlphp/simplesamlphp-module-infocard": "<1.0.1",
"simplesamlphp/simplesamlphp-module-openid": "<1",
"simplesamlphp/simplesamlphp-module-openidprovider": "<0.9",
"simplito/elliptic-php": "<1.0.6",
"slim/slim": "<2.6",
"smarty/smarty": "<3.1.47|>=4,<4.2.1",
"snipe/snipe-it": "<=6.0.14|>= 6.0.0-RC-1, <= 6.0.0-RC-5",
"socalnick/scn-social-auth": "<1.15.2",
"socialiteproviders/steam": "<1.1",
"spatie/browsershot": "<3.57.4",
"spipu/html2pdf": "<5.2.4",
"spoonity/tcpdf": "<6.2.22",
"squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1",
"ssddanbrown/bookstack": "<22.2.3",
"statamic/cms": "<3.2.39|>=3.3,<3.3.2",
"stormpath/sdk": ">=0,<9.9.99",
"studio-42/elfinder": "<2.1.59",
"subrion/cms": "<=4.2.1",
"sukohi/surpass": "<1",
"sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8",
"sumocoders/framework-user-bundle": "<1.4",
"swag/paypal": "<5.4.4",
"swiftmailer/swiftmailer": ">=4,<5.4.5",
"sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2",
"sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
"sylius/grid-bundle": "<1.10.1",
"sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1",
"sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4",
"sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2",
"symbiote/silverstripe-multivaluefield": ">=3,<3.0.99",
"symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4",
"symbiote/silverstripe-seed": "<6.0.3",
"symbiote/silverstripe-versionedfiles": "<=2.0.3",
"symfont/process": ">=0",
"symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8",
"symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4",
"symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
"symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14",
"symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
"symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
"symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
"symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1",
"symfony/mime": ">=4.3,<4.3.8",
"symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/polyfill": ">=1,<1.10",
"symfony/polyfill-php55": ">=1,<1.10",
"symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/routing": ">=2,<2.0.19",
"symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8",
"symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
"symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9",
"symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
"symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8",
"symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2",
"symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12",
"symfony/symfony": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6",
"symfony/translation": ">=2,<2.0.17",
"symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3",
"symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8",
"symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
"symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
"t3/dce": ">=2.2,<2.6.2",
"t3g/svg-sanitizer": "<1.0.3",
"tastyigniter/tastyigniter": "<3.3",
"tecnickcom/tcpdf": "<6.2.22",
"terminal42/contao-tablelookupwizard": "<3.3.5",
"thelia/backoffice-default-template": ">=2.1,<2.1.2",
"thelia/thelia": ">=2.1-beta.1,<2.1.3",
"theonedemon/phpwhois": "<=4.2.5",
"thinkcmf/thinkcmf": "<=5.1.7",
"thorsten/phpmyfaq": "<3.1.11",
"tinymce/tinymce": "<5.10.7|>=6,<6.3.1",
"tinymighty/wiki-seo": "<1.2.2",
"titon/framework": ">=0,<9.9.99",
"tobiasbg/tablepress": "<= 2.0-RC1",
"topthink/framework": "<6.0.14",
"topthink/think": "<=6.1.1",
"topthink/thinkphp": "<=3.2.3",
"tribalsystems/zenario": "<=9.3.57595",
"truckersmp/phpwhois": "<=4.3.1",
"ttskch/pagination-service-provider": "<1",
"twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3",
"typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2",
"typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
"typo3/cms-core": "<8.7.51|>=9,<9.5.40|>=10,<10.4.36|>=11,<11.5.23|>=12,<12.2",
"typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
"typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
"typo3/html-sanitizer": ">=1,<1.5|>=2,<2.1.1",
"typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3",
"typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1",
"typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
"typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10",
"ua-parser/uap-php": "<3.8",
"unisharp/laravel-filemanager": "<=2.5.1",
"userfrosting/userfrosting": ">=0.3.1,<4.6.3",
"usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
"uvdesk/community-skeleton": "<1.1",
"vanilla/safecurl": "<0.9.2",
"verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4",
"vova07/yii2-fileapi-widget": "<0.1.9",
"vrana/adminer": "<4.8.1",
"wallabag/tcpdf": "<6.2.22",
"wallabag/wallabag": "<2.5.4",
"wanglelecc/laracms": "<=1.0.3",
"web-auth/webauthn-framework": ">=3.3,<3.3.4",
"webbuilders-group/silverstripe-kapost-bridge": "<0.4",
"webcoast/deferred-image-processing": "<1.0.2",
"webpa/webpa": "<3.1.2",
"wikimedia/parsoid": "<0.12.2",
"willdurand/js-translation-bundle": "<2.1.1",
"wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1",
"woocommerce/woocommerce": "<6.6",
"wp-cli/wp-cli": "<2.5",
"wp-graphql/wp-graphql": "<0.3.5",
"wpanel/wpanel4-cms": "<=4.3.1",
"wpcloud/wp-stateless": "<3.2",
"wwbn/avideo": "<12.4",
"xataface/xataface": "<3",
"xpressengine/xpressengine": "<3.0.15",
"yeswiki/yeswiki": "<4.1",
"yetiforce/yetiforce-crm": "<=6.4",
"yidashi/yii2cmf": "<=2",
"yii2mod/yii2-cms": "<1.9.2",
"yiisoft/yii": "<1.1.27",
"yiisoft/yii2": "<2.0.38",
"yiisoft/yii2-bootstrap": "<2.0.4",
"yiisoft/yii2-dev": "<2.0.43",
"yiisoft/yii2-elasticsearch": "<2.0.5",
"yiisoft/yii2-gii": "<=2.2.4",
"yiisoft/yii2-jui": "<2.0.4",
"yiisoft/yii2-redis": "<2.0.8",
"yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6",
"yoast-seo-for-typo3/yoast_seo": "<7.2.3",
"yourls/yourls": "<=1.8.2",
"zendesk/zendesk_api_client_php": "<2.2.11",
"zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3",
"zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2",
"zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2",
"zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5",
"zendframework/zend-developer-tools": ">=1.2.2,<1.2.3",
"zendframework/zend-diactoros": "<1.8.4",
"zendframework/zend-feed": "<2.10.3",
"zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1",
"zendframework/zend-http": "<2.8.1",
"zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6",
"zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3",
"zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2",
"zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1",
"zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4",
"zendframework/zend-validator": ">=2.3,<2.3.6",
"zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1",
"zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6",
"zendframework/zendframework": "<=3",
"zendframework/zendframework1": "<1.12.20",
"zendframework/zendopenid": ">=2,<2.0.2",
"zendframework/zendxml": ">=1,<1.0.1",
"zetacomponents/mail": "<1.8.2",
"zf-commons/zfc-user": "<1.2.2",
"zfcampus/zf-apigility-doctrine": ">=1,<1.0.3",
"zfr/zfr-oauth2-server-module": "<0.1.2",
"zoujingli/thinkadmin": "<6.0.22"
},
"default-branch": true,
"type": "metapackage",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"role": "maintainer"
},
{
"name": "Ilya Tribusean",
"email": "slash3b@gmail.com",
"role": "maintainer"
}
],
"description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
"keywords": [
"dev"
],
"support": {
"issues": "https://github.com/Roave/SecurityAdvisories/issues",
"source": "https://github.com/Roave/SecurityAdvisories/tree/latest"
},
"funding": [
{
"url": "https://github.com/Ocramius",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/roave/security-advisories",
"type": "tidelift"
}
],
"time": "2023-03-13T21:04:29+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"nextcloud/ocp": 20,
"roave/security-advisories": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"platform-overrides": {
"php": "7.4"
},
"plugin-api-version": "2.6.0"
}

View file

@ -27,119 +27,129 @@
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.cursor {
border: 1px solid #ccc;
padding: 4px;
background-color: white;
z-index: 100;
}
#presentationMode,
#openFile,
#print,
#download,
#viewBookmark,
#secondaryToolbarToggle,
.verticalToolbarSeparator {
#presentationMode, #openFile, #print, #download, #viewBookmark, #secondaryToolbarToggle, .verticalToolbarSeparator {
display: none !important;
}
.noneMode::before {
-webkit-mask-image: url("../img/icon-notool.svg");
mask-image: url("../img/icon-notool.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-notool.svg);
background-repeat: no-repeat;
}
.selectMode::before {
-webkit-mask-image: url("../img/icon-select.svg");
mask-image: url("../img/icon-select.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-select.svg);
background-repeat: no-repeat;
}
.pointerMode::before {
-webkit-mask-image: url("../img/icon-pointer.svg");
mask-image: url("../img/icon-pointer.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-pointer.svg);
background-repeat: no-repeat;
}
.freehandMode::before {
-webkit-mask-image: url("../img/icon-freehand.svg");
mask-image: url("../img/icon-freehand.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-freehand.svg);
background-repeat: no-repeat;
}
.rectangleMode::before {
-webkit-mask-image: url("../img/icon-rectangle.svg");
mask-image: url("../img/icon-rectangle.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-rectangle.svg);
background-repeat: no-repeat;
}
.ellipseMode::before {
-webkit-mask-image: url("../img/icon-ellipse.svg");
mask-image: url("../img/icon-ellipse.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-ellipse.svg);
background-repeat: no-repeat;
}
.lineMode::before {
-webkit-mask-image: url("../img/icon-line.svg");
mask-image: url("../img/icon-line.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-line.svg);
background-repeat: no-repeat;
}
.textMode::before {
-webkit-mask-image: url("../img/icon-text.svg");
mask-image: url("../img/icon-text.svg");
}
/*
// Provided by viewer.css
.toolbarButton.download::before {
-webkit-mask-image: url("../img/icon-download.svg");
mask-image: url("../img/icon-download.svg");
content: "";
display: block;
width: 16px;
height: 16px;
background-size: 16px 16px;
background-image: url(../img/icon-download.svg);
background-repeat: no-repeat;
}
.secondaryToolbar.drawMenuToolbar {
right: 105px !important;
}
*/
.secondaryToolbar.drawMenuToolbar {
padding: 0;
right: 94px !important;
line-height: 0 !important;
}
.secondaryToolbar.drawMenuToolbar .toolbarButton::before {
position: relative !important;
top: 1px !important;
left: 1px !important;
}
.secondaryToolbar.drawMenuToolbar .toolbarButton {
margin: 2px 1px;
position: relative;
float: left;
margin: 0 !important;
}
#settingsDialog {
#colorPicker {
display: none;
position: absolute;
background: rgba(0, 0, 0, 0.5);
top: 48px;
right: 16px;
left: 50%;
top: 50%;
z-index: 10000;
padding: 20px;
border-radius: 20px;
}
#settingsDialog label {
display: block;
color: white;
}
.settings-field {
margin-top: 1em;
}
.settings-field input {
width: 100%;
margin-left: -160px;
margin-top: -160px;
}
.toolbarButton.close::before {
display: block;
content: " ";
background-image: url("../img/toolbarButton-secondaryToolbarClose.svg");
content: ' ';
background-image: url(../img/toolbarButton-secondaryToolbarClose.svg);
background-size: 16px 16px;
height: 16px;
width: 16px;
}
#drawModeToolbar .dropdown {
background: url("../img/icon-dropdown.svg");
background: url(../img/icon-dropdown.svg);
width: 16px;
height: 16px;
background-size: 16px 16px;
@ -147,6 +157,39 @@
margin-top: -2px;
}
@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (min-resolution: 2dppx) {
#noneMode::before,
#selectMode::before,
#pointerMode::before,
#freehandMode::before,
#rectangleMode::before,
#ellipseMode::before,
#lineMode::before,
#drawModeToolbar::before,
.toolbarButton.download::before {
background-size: 32px 32px !important;
height: 32px !important;
width: 32px !important;
}
.secondaryToolbar.drawMenuToolbar .toolbarButton::before {
top: -7px !important;
left: -7px !important;
}
#drawModeToolbarButtonContainer {
max-height: 26px;
}
}
@media screen and (min-resolution: 2dppx) {
.toolbarButton.close::before {
background-size: 32px 32px !important;
height: 32px !important;
width: 32px !important;
}
}
.userlist {
display: none;
position: absolute;
@ -249,55 +292,10 @@
}
.toolbarButton.selected {
background-color: hsla(0, 0%, 0%, 0.12);
background-image: linear-gradient(hsla(0, 0%, 100%, 0.05), hsla(0, 0%, 100%, 0));
background-color: hsla(0,0%,0%,.12);
background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
background-clip: padding-box;
border: 1px solid hsla(0, 0%, 0%, 0.35);
border-color: hsla(0, 0%, 0%, 0.32) hsla(0, 0%, 0%, 0.38) hsla(0, 0%, 0%, 0.42);
/* stylelint-disable-next-line max-line-length */
box-shadow: 0 1px 0 hsla(0, 0%, 100%, 0.05) inset, 0 0 1px hsla(0, 0%, 100%, 0.15) inset, 0 1px 0 hsla(0, 0%, 100%, 0.05);
}
.textareaContainer {
position: absolute !important;
border: none;
width: 300px;
max-width: 300px;
}
.textareaContainer textarea {
height: 200px;
max-height: 200px;
width: calc(100% - 2em);
max-width: calc(100% - 2em);
margin: 1em;
box-shadow: none;
}
.textareaContainer .deleteButton {
width: 20%;
height: 25px;
float: right;
margin-bottom: 5px;
font-size: 18px;
cursor: pointer;
user-select: none;
}
.textareaContainer .deleteButton[disabled] {
cursor: default;
}
.textareaContainer .author {
cursor: default;
display: inline-block;
margin-top: 12px;
margin-left: 12px;
padding: 0.5em;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border-radius: 4px;
user-select: none;
border: 1px solid hsla(0,0%,0%,.35);
border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, 0 0 1px hsla(0,0%,100%,.15) inset, 0 1px 0 hsla(0,0%,100%,.05);
}

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#FFFFFF" d="M4.565,2.609h22.89l0.217,6.879h-0.969c-0.475-2.162-1.078-3.568-1.809-4.221
c-0.732-0.651-2.27-0.978-4.615-0.978h-2.254v20.715c0,1.56,0.244,2.526,0.732,2.898c0.486,0.373,1.555,0.619,3.201,0.738v0.75
h-11.8v-0.75c1.713-0.133,2.78-0.414,3.202-0.848c0.421-0.431,0.632-1.52,0.632-3.264V4.289h-2.272
c-2.24,0-3.766,0.323-4.575,0.968c-0.811,0.646-1.42,2.056-1.829,4.231H4.328L4.565,2.609z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 908 B

View file

@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* global OCP, $, Handlebars */
/* global OC, OCP, OCA, $, _, Handlebars */
(function(OC, OCP, OCA, $, _, Handlebars) {
'use strict';

8
js/libs/iro-4.5.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
js/libs/jquery-3.3.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

39
js/libs/paper-0.11.8.min.js vendored Normal file

File diff suppressed because one or more lines are too long

8
js/libs/socket.io-2.1.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -19,8 +19,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import $ from 'jquery';
(function(OCA) {
OCA.PdfDraw = OCA.PdfDraw || {};
@ -87,14 +85,6 @@ if (OCA.FilesPdfViewer && OCA.FilesPdfViewer.PreviewPlugin) {
};
}
document.addEventListener("webviewerloaded", function(event) {
var locale = OC.getLocale();
if (locale && event.detail && event.detail.source && event.detail.source.PDFViewerApplicationOptions) {
var PDFViewerApplicationOptions = event.detail.source.PDFViewerApplicationOptions;
PDFViewerApplicationOptions.set('locale', locale.replace('_', '-'));
}
});
$(document).ready(function() {
if (OCA.Sharing && OCA.Sharing.PublicApp) {
var mimetype = $("#mimetype");

File diff suppressed because it is too large Load diff

View file

@ -1,39 +0,0 @@
OC.L10N.register(
"pdfdraw",
{
"FileId is empty." : "Keine FileId übergeben.",
"File not found." : "Datei wurde nicht gefunden.",
"You do not have enough permissions to view the file." : "Sie haben keine ausreichenden Berechtigungen, um die Datei zu öffnen.",
"Token is empty." : "Kein Token übergeben.",
"File %s is not a PDF file (%s)." : "Datei %s ist kein PDF Dokument (%s).",
"No backend configured." : "Kein Backend konfiguriert.",
"Invalid token." : "Ungültiger Token.",
"Access denied." : "Zugriff verweigert.",
"PDF Annotations" : "PDF Annotationen",
"Annotate PDF documents" : "PDF Dokumente annotieren",
"PDF annotations for Nextcloud\n\nAnnotate any PDF document collaboratively inside Nextcloud. Select \"Annotate\" from the context menu of PDF files to open the annotation mode.\n\nRequires a separate nodejs server running on the backend to distribute the signaling messages between clients.\nThe server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server)." : "PDF Annotationen für Nextcloud\n\nAnnotieren Sie beliebige PDF Dokumente gemeinsam in Nextcloud. Wählen Sie \"Annotieren\" aus dem Kontext-Menü von PDF Dateien, um den Annotations-Modus zu öffnen.\n\nBenötigt einen separaten nodejs Server als Backend, um Nachrichten zwischen Clients auszutauschen. Der Server ist auf [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server) verfügbar.",
"Annotate" : "Annotieren",
"Open" : "Öffnen",
"Backend server" : "Backend-Server",
"https://server.domain.invalid/path/" : "https://server.domain.invalid/path/",
"Saved" : "Gespeichert",
"Shared secret" : "Geteiltes Geheimnis",
"Stroke width" : "Linienbreite",
"Establishing connection, please wait..." : "Verbindung wird hergestellt, bitte warten...",
"The connection is interrupted, reconnecting..." : "Die Verbindung ist unterbrochen, verbinde neu...",
"Generating combined PDF, please wait..." : "Zusammengefügtes PDF wird erstellt, bitte warten...",
"PDF generation failed, please try again later." : "PDF Erzeugung fehlgeschlagen, bitte versuchen Sie es später nochmal.",
"Freehand" : "Freihand",
"Rectangle" : "Rechteck",
"Ellipse" : "Ellipse",
"Line" : "Linie",
"Comment" : "Kommentar",
"No tool" : "Nichts wählen",
"Select" : "Auswählen",
"Pointer" : "Zeiger",
"Draw mode" : "Zeichenmodus",
"Select color" : "Farbe wählen",
"Download" : "Herunterladen",
"Close" : "Schließen"
},
"nplurals=2; plural=(n != 1);");

View file

@ -1,37 +0,0 @@
{ "translations": {
"FileId is empty." : "Keine FileId übergeben.",
"File not found." : "Datei wurde nicht gefunden.",
"You do not have enough permissions to view the file." : "Sie haben keine ausreichenden Berechtigungen, um die Datei zu öffnen.",
"Token is empty." : "Kein Token übergeben.",
"File %s is not a PDF file (%s)." : "Datei %s ist kein PDF Dokument (%s).",
"No backend configured." : "Kein Backend konfiguriert.",
"Invalid token." : "Ungültiger Token.",
"Access denied." : "Zugriff verweigert.",
"PDF Annotations" : "PDF Annotationen",
"Annotate PDF documents" : "PDF Dokumente annotieren",
"PDF annotations for Nextcloud\n\nAnnotate any PDF document collaboratively inside Nextcloud. Select \"Annotate\" from the context menu of PDF files to open the annotation mode.\n\nRequires a separate nodejs server running on the backend to distribute the signaling messages between clients.\nThe server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server)." : "PDF Annotationen für Nextcloud\n\nAnnotieren Sie beliebige PDF Dokumente gemeinsam in Nextcloud. Wählen Sie \"Annotieren\" aus dem Kontext-Menü von PDF Dateien, um den Annotations-Modus zu öffnen.\n\nBenötigt einen separaten nodejs Server als Backend, um Nachrichten zwischen Clients auszutauschen. Der Server ist auf [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server) verfügbar.",
"Annotate" : "Annotieren",
"Open" : "Öffnen",
"Backend server" : "Backend-Server",
"https://server.domain.invalid/path/" : "https://server.domain.invalid/path/",
"Saved" : "Gespeichert",
"Shared secret" : "Geteiltes Geheimnis",
"Stroke width" : "Linienbreite",
"Establishing connection, please wait..." : "Verbindung wird hergestellt, bitte warten...",
"The connection is interrupted, reconnecting..." : "Die Verbindung ist unterbrochen, verbinde neu...",
"Generating combined PDF, please wait..." : "Zusammengefügtes PDF wird erstellt, bitte warten...",
"PDF generation failed, please try again later." : "PDF Erzeugung fehlgeschlagen, bitte versuchen Sie es später nochmal.",
"Freehand" : "Freihand",
"Rectangle" : "Rechteck",
"Ellipse" : "Ellipse",
"Line" : "Linie",
"Comment" : "Kommentar",
"No tool" : "Nichts wählen",
"Select" : "Auswählen",
"Pointer" : "Zeiger",
"Draw mode" : "Zeichenmodus",
"Select color" : "Farbe wählen",
"Download" : "Herunterladen",
"Close" : "Schließen"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}

View file

@ -1,38 +0,0 @@
OC.L10N.register(
"pdfdraw",
{
"FileId is empty." : "File ID está vacío.",
"File not found." : "Archivo no encontrado.",
"You do not have enough permissions to view the file." : "No tiene suficientes permisos para ver el archivo.",
"Token is empty." : "El Token está vacío.",
"File %s is not a PDF file (%s)." : "El archivo %s no es un archivo PDF (%s).",
"No backend configured." : "No se ha configurado la Base de datos.",
"Invalid token." : "Token inválido.",
"Access denied." : "Acceso denegado.",
"PDF Annotations" : "Anotaciones en PDF",
"Annotate PDF documents" : "Anotar en documentos PDF",
"PDF annotations for Nextcloud\n\nAnnotate any PDF document collaboratively inside Nextcloud. Select \"Annotate\" from the context menu of PDF files to open the annotation mode.\n\nRequires a separate nodejs server running on the backend to distribute the signaling messages between clients.\nThe server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server)." : "Anotaciones en PDF para Nextcloud. \n\nAnota en cualquier documento PDF en modo compartido dentro de Nextcloud. Seleccione \"Anotar\" en el menú contextual de los archivos PDF para abrir el modo de anotación. \n\nRequiere un servidor nodejs independiente que se ejecute en la Base de datos para distribuir los mensajes de anotación entre los clientes. \nEl servidor está disponible en [GitHub]. (https://github.com/strukturag/pdfdraw/tree/master/server).",
"Annotate" : "Anotar",
"Open" : "Abrir",
"Backend server" : "Servidor de Base de Datos",
"https://server.domain.invalid/path/" : "https://server.domain.invalid/path/",
"Saved" : "Guardado",
"Shared secret" : "Secreta compartida",
"Stroke width" : "Ancho de linea",
"Establishing connection, please wait..." : "Estableciendo conexión, por favor espere...",
"The connection is interrupted, reconnecting..." : "La conexión esta interrumpida, volviendo a conectar...",
"Generating combined PDF, please wait..." : "Generando PDF combinado, por favor espere...",
"PDF generation failed, please try again later." : "Error al generar el PDF, por favor inténtelo más tarde.",
"Freehand" : "Mano alzada",
"Rectangle" : "rectángulo",
"Ellipse" : "Elipse",
"Line" : "Linea",
"No tool" : "Ninguna herramienta",
"Select" : "Seleccionar",
"Pointer" : "Puntero",
"Draw mode" : "Modo de dibujo",
"Select color" : "Seleccionar color",
"Download" : "Descargar",
"Close" : "Cerrar"
},
"nplurals=2; plural=(n != 1);");

View file

@ -1,36 +0,0 @@
{ "translations": {
"FileId is empty." : "File ID está vacío.",
"File not found." : "Archivo no encontrado.",
"You do not have enough permissions to view the file." : "No tiene suficientes permisos para ver el archivo.",
"Token is empty." : "El Token está vacío.",
"File %s is not a PDF file (%s)." : "El archivo %s no es un archivo PDF (%s).",
"No backend configured." : "No se ha configurado la Base de datos.",
"Invalid token." : "Token inválido.",
"Access denied." : "Acceso denegado.",
"PDF Annotations" : "Anotaciones en PDF",
"Annotate PDF documents" : "Anotar en documentos PDF",
"PDF annotations for Nextcloud\n\nAnnotate any PDF document collaboratively inside Nextcloud. Select \"Annotate\" from the context menu of PDF files to open the annotation mode.\n\nRequires a separate nodejs server running on the backend to distribute the signaling messages between clients.\nThe server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server)." : "Anotaciones en PDF para Nextcloud. \n\nAnota en cualquier documento PDF en modo compartido dentro de Nextcloud. Seleccione \"Anotar\" en el menú contextual de los archivos PDF para abrir el modo de anotación. \n\nRequiere un servidor nodejs independiente que se ejecute en la Base de datos para distribuir los mensajes de anotación entre los clientes. \nEl servidor está disponible en [GitHub]. (https://github.com/strukturag/pdfdraw/tree/master/server).",
"Annotate" : "Anotar",
"Open" : "Abrir",
"Backend server" : "Servidor de Base de Datos",
"https://server.domain.invalid/path/" : "https://server.domain.invalid/path/",
"Saved" : "Guardado",
"Shared secret" : "Secreta compartida",
"Stroke width" : "Ancho de linea",
"Establishing connection, please wait..." : "Estableciendo conexión, por favor espere...",
"The connection is interrupted, reconnecting..." : "La conexión esta interrumpida, volviendo a conectar...",
"Generating combined PDF, please wait..." : "Generando PDF combinado, por favor espere...",
"PDF generation failed, please try again later." : "Error al generar el PDF, por favor inténtelo más tarde.",
"Freehand" : "Mano alzada",
"Rectangle" : "rectángulo",
"Ellipse" : "Elipse",
"Line" : "Linea",
"No tool" : "Ninguna herramienta",
"Select" : "Seleccionar",
"Pointer" : "Puntero",
"Draw mode" : "Modo de dibujo",
"Select color" : "Seleccionar color",
"Download" : "Descargar",
"Close" : "Cerrar"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}

View file

@ -23,21 +23,16 @@ declare(strict_types=1);
namespace OCA\Pdfdraw\Controller;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use OCA\Pdfdraw\Vendor\Firebase\JWT\JWT;
use OCA\Pdfdraw\Vendor\Firebase\JWT\Key;
use OC\Files\Filesystem;
use \Firebase\JWT\JWT;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataDownloadResponse;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\File;
use OCP\Files\IRootFolder;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\ILogger;
use OCP\IRequest;
class ApiController extends OCSController {
@ -52,15 +47,9 @@ class ApiController extends OCSController {
*/
private $root;
/** @var IUserMountCache */
private $userMountCache;
/** @var IConfig */
private $config;
/** @var ILogger */
private $logger;
/**
* @param string $AppName
* @param IRequest $request
@ -70,15 +59,11 @@ class ApiController extends OCSController {
IRequest $request,
IDBConnection $db,
IRootFolder $root,
IUserMountCache $userMountCache,
IConfig $config,
ILogger $logger) {
IConfig $config) {
parent::__construct($AppName, $request);
$this->db = $db;
$this->root = $root;
$this->userMountCache = $userMountCache;
$this->config = $config;
$this->logger = $logger;
}
/**
@ -101,8 +86,7 @@ class ApiController extends OCSController {
}
try {
$key = new Key($secret, 'HS256');
$decoded = JWT::decode($token, $key);
$decoded = JWT::decode($token, $secret, array('HS256'));
} catch (\Exception $e) {
return null;
}
@ -190,11 +174,7 @@ class ApiController extends OCSController {
'data' => $query->createNamedParameter($data),
]
);
try {
$query->execute();
} catch (UniqueConstraintViolationException $e) {
// Ignore, another request created the item.
}
$query->execute();
}
return new DataResponse([]);
}
@ -244,45 +224,46 @@ class ApiController extends OCSController {
return new DataResponse([], Http::STATUS_UNAUTHORIZED);
}
$mountPoints = $this->userMountCache->getMountsForFileId($fileId);
if (empty($mountPoints)) {
$query = $this->db->getQueryBuilder();
$query->select('storage')
->from('filecache')
->where($query->expr()->eq('fileid', $query->createNamedParameter($fileId)));
$result = $query->execute();
$storage = null;
while ($row = $result->fetch()) {
$storage = $row['storage'];
break;
}
if (empty($storage)) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
foreach ($mountPoints as $mountPoint) {
try {
$userId = $mountPoint->getUser()->getUID();
$userFolder = $this->root->getUserFolder($userId);
if (!Filesystem::$loaded) {
// Filesystem wasn't loaded for anyone,
// so we boot it up in order to make hooks in the View work.
Filesystem::init($userId, '/' . $userId . '/files');
}
} catch (\Exception $e) {
$this->logger->debug($e->getMessage(), [
'app' => $this->appName,
'exception' => $e,
]);
continue;
}
$files = $userFolder->getById($fileId);
if (empty($files)) {
continue;
}
foreach ($files as $file) {
if ($file->isReadable()) {
return new DataDownloadResponse($file->getContent(), $file->getName(), $file->getMimeType());
}
$this->logger->debug('Mount point ' . ($mountPoint->getMountId() ?? 'null') . ' has access to file ' . $file->getId() . ' but permissions are ' . $file->getPermissions(), [
'app' => $this->appName,
]);
}
$query = $this->db->getQueryBuilder();
$query->select('id')
->from('storages')
->where($query->expr()->eq('numeric_id', $query->createNamedParameter($storage)));
$result = $query->execute();
$homeId = null;
while ($row = $result->fetch()) {
$homeId = $row['id'];
break;
}
if (empty($homeId) || strpos($homeId, 'home::') !== 0) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
return new DataResponse([], Http::STATUS_NOT_FOUND);
$ownerId = substr($homeId, 6);
$files = $this->root->getUserFolder($ownerId)->getById($fileId);
if (empty($files)) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
$file = $files[0];
if (!$file instanceof File) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
return new DataDownloadResponse($file->getContent(), $file->getName(), $file->getMimeType());
}
}

View file

@ -23,8 +23,7 @@ declare(strict_types=1);
namespace OCA\Pdfdraw\Controller;
use OCA\Pdfdraw\Vendor\Firebase\JWT\JWT;
use OCA\Pdfdraw\Vendor\Firebase\JWT\Key;
use \Firebase\JWT\JWT;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\ContentSecurityPolicy;
@ -53,10 +52,6 @@ use Symfony\Component\EventDispatcher\GenericEvent;
class ViewerController extends Controller {
const PDF_MIME_TYPES = [
'application/pdf',
];
/** @var string */
private $userId;
@ -149,7 +144,7 @@ class ViewerController extends Controller {
*/
private function getFile($userId, $fileId) {
if (empty($fileId)) {
return [NULL, $this->l10n->t("FileId is empty.")];
return [NULL, $this->l10n->t("FileId is empty")];
}
if ($userId !== NULL) {
@ -160,19 +155,19 @@ class ViewerController extends Controller {
}
if (empty($files)) {
return [NULL, $this->l10n->t("File not found.")];
return [NULL, $this->l10n->t("File not found")];
}
$file = $files[0];
if (!$file->isReadable()) {
return [NULL, $this->l10n->t("You do not have enough permissions to view the file.")];
return [NULL, $this->l10n->t("You do not have enough permissions to view the file")];
}
return [$file, NULL];
}
private function getShare($token) {
if (empty($token)) {
return [NULL, $this->l10n->t("Token is empty.")];
return [NULL, $this->l10n->t("Token is empty")];
}
$share;
@ -184,13 +179,13 @@ class ViewerController extends Controller {
}
if ($share === NULL || $share === false) {
return [NULL, $this->l10n->t("You do not have enough permissions to view the file.")];
return [NULL, $this->l10n->t("You do not have enough permissions to view the file")];
}
if ($share->getPassword()
&& (!$this->session->exists("public_link_authenticated")
|| $this->session->get("public_link_authenticated") !== (string) $share->getId())) {
return [NULL, $this->l10n->t("You do not have enough permissions to view the file.")];
return [NULL, $this->l10n->t("You do not have enough permissions to view the file")];
}
return [$share, NULL];
@ -204,20 +199,20 @@ class ViewerController extends Controller {
}
if (($share->getPermissions() & Constants::PERMISSION_READ) === 0) {
return [NULL, $this->l10n->t("You do not have enough permissions to view the file.")];
return [NULL, $this->l10n->t("You do not have enough permissions to view the file")];
}
try {
$node = $share->getNode();
} catch (NotFoundException $e) {
$this->logger->error("getFileByToken error: " . $e->getMessage(), array("app" => $this->appName));
return [NULL, $this->l10n->t("File not found.")];
return [NULL, $this->l10n->t("File not found")];
}
if ($node instanceof Folder) {
$files = $node->getById($fileId);
if (empty($files)) {
return [NULL, $this->l10n->t("File not found.")];
return [NULL, $this->l10n->t("File not found")];
}
$file = $files[0];
} else {
@ -260,25 +255,13 @@ class ViewerController extends Controller {
'fileId' => $fileId,
'token' => $token,
];
$jwt = JWT::encode($data, $secret, 'HS256');
$jwt = JWT::encode($data, $secret);
$fileUrl = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".viewer.downloadFile", ["token" => $jwt]);
return $fileUrl;
}
private function isValidPdfFile($file) {
$mime = $file->getMimeType();
if ($mime) {
$mime = strtolower($mime);
}
if (!in_array($mime, self::PDF_MIME_TYPES)) {
return $this->l10n->t('File %s is not a PDF file (%s).', [$file->getName(), $mime]);
}
return null;
}
/**
* @NoAdminRequired
* @NoCSRFRequired
@ -299,12 +282,6 @@ class ViewerController extends Controller {
return ['error' => $error];
}
$error = $this->isValidPdfFile($file);
if (isset($error)) {
$this->logger->error("index: " . $fileId . " " . $error, array("app" => $this->appName));
return ['error' => $error];
}
$backend = $this->config->getAppValue('pdfdraw', 'backend');
if (!empty($backend)) {
$backend = json_decode($backend);
@ -352,12 +329,6 @@ class ViewerController extends Controller {
return ['error' => $error];
}
$error = $this->isValidPdfFile($file);
if (isset($error)) {
$this->logger->error("viewer: " . $fileId . " " . $error, array("app" => $this->appName));
return ['error' => $error];
}
if (!empty($token)) {
list ($share, $error) = $this->getShare($token);
if (isset($error)) {
@ -405,7 +376,7 @@ class ViewerController extends Controller {
'displayname' => $displayName,
'permissions' => $permissions,
];
$jwt = JWT::encode($token, $secret, 'HS256');
$jwt = JWT::encode($token, $secret);
}
$params = [
'urlGenerator' => $this->urlGenerator,
@ -448,14 +419,13 @@ class ViewerController extends Controller {
public function downloadFile(string $token) {
$secret = $this->getDownloadSecret();
try {
$key = new Key($secret, 'HS256');
$data = JWT::decode($token, $key);
$data = JWT::decode($token, $secret, ['HS256']);
} catch (\Exception $e) {
$this->logger->logException($e, [
'message' => 'download: ' . $token,
'app' => $this->appName,
]);
return new JSONResponse(["message" => $this->l10n->t("Invalid token.")], Http::STATUS_FORBIDDEN);
return new JSONResponse(["message" => $this->l10n->t("Invalid token")], Http::STATUS_FORBIDDEN);
}
if ($this->userSession->isLoggedIn()) {
@ -472,7 +442,7 @@ class ViewerController extends Controller {
}
if ($this->userSession->isLoggedIn() && !$file->isReadable()) {
return new JSONResponse(["message" => $this->l10n->t("Access denied.")], Http::STATUS_FORBIDDEN);
return new JSONResponse(["message" => $this->l10n->t("Access denied")], Http::STATUS_FORBIDDEN);
}
return new DataDisplayResponse($file->getContent(), Http::STATUS_OK, [

View file

@ -1,41 +0,0 @@
<?php
namespace OCA\Pdfdraw\Migration;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version1000Date20211122150107 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if (!$schema->hasTable('pdfdraw_items')) {
$table = $schema->createTable('pdfdraw_items');
$table->addColumn('file_id', 'string', [
'notnull' => true,
]);
$table->addColumn('page', 'integer', [
'notnull' => true,
]);
$table->addColumn('name', 'string', [
'notnull' => true,
]);
$table->addColumn('data', 'text', [
'notnull' => true,
]);
$table->setPrimaryKey(['file_id', 'name']);
$table->addIndex(['file_id'], 'fileid_index');
}
return $schema;
}
}

7325
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,33 +0,0 @@
{
"name": "pdfdraw",
"version": "0.1.0",
"private": true,
"description": "",
"author": "struktur AG <opensource@struktur.de>",
"scripts": {
"build": "NODE_ENV=production webpack --progress --config webpack.js",
"dev": "NODE_ENV=development webpack --config webpack.js",
"watch": "NODE_ENV=development webpack watch --config webpack.js",
"lint": "eslint src",
"stylelint": "stylelint css/*.css css/*.scss"
},
"dependencies": {
"@jaames/iro": "5.5.2",
"jquery": "3.7.1",
"jquery-ui": "1.13.2",
"lodash": "4.17.21",
"paper": "0.12.17",
"pdfjs-dist": "2.12.313",
"pdfjs-dist-viewer-min": "2.12.313",
"socket.io-client": "4.6.1",
"url": "0.11.3"
},
"devDependencies": {
"copy-webpack-plugin": "12.0.2",
"eslint": "8.56.0",
"stylelint": "15.11.0",
"stylelint-config-standard-scss": "11.1.0",
"webpack": "5.89.0",
"webpack-cli": "5.1.4"
}
}

11
run-eslint.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
ESLINT=$(which eslint || true)
if [ -z "$ESLINT" ]; then
echo "Can't find command \"eslint\" in $PATH"
exit 1
fi
echo Checking scripts with $ESLINT ...
find . -name "*.js" -print0 | xargs -0 $ESLINT

11
run-stylelint.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
STYLELINT=$(which stylelint || true)
if [ -z "$STYLELINT" ]; then
echo "Can't find command \"stylelint\" in $PATH"
exit 1
fi
echo Checking stylesheets with $STYLELINT ...
find . -name "*.*css" -print0 | xargs -0 $STYLELINT

View file

@ -27,7 +27,7 @@ running the pdfdraw server.
Install the node dependencies by running `npm install` in the `server` folder.
Copy `config.js.in` to `config.js` and adjust to your requirements.
Copy `server.conf.in` to `server.conf` and adjust to your requirements.
## Running
@ -63,28 +63,3 @@ fields:
- `author` (string): Optional author name to add to the annotation metadata.
- `modified` (number): Optional timestamp (seconds since the epoch, in UTC)
when the annotation was last modified.
# Run pdfdraw server in a docker container using docker-compose.
All settings are exposed into enviroment variables. That means you are able to config the backend server in [docker-compose.yml](docker-compose.yml.in) yaml file by editing the corresponding enviroment variables.
Save `docker-compose.yml.in` to `docker-compose.yml` and make changes if needed.
Based on your docker setup you still need to edit a few lines in the `docker-compose.yml` file for networking.
For example by exposing ports:
ports:
- "8080:8080"
or join an existing network:
networks:
default:
external:
name: my-pre-existing-network
For more details read [Networking in Compose](https://docs.docker.com/compose/networking/)
Than run docker compose.
docker-compose up -d

View file

@ -18,18 +18,10 @@
## You should have received a copy of the GNU Affero General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
##
from __future__ import print_function
from io import BytesIO
from cStringIO import StringIO
import sys
import time
try:
basestring
except NameError:
# Python 3
basestring = str
try:
from PyPDF2.generic import ArrayObject, BooleanObject, DictionaryObject, FloatObject, NameObject, RectangleObject, TextStringObject
from PyPDF2.pdf import PdfFileReader, PdfFileWriter
@ -57,7 +49,7 @@ def annotate(fp_in, annotations):
try:
pdfpage = pdf.getPage(page)
except IndexError:
print('Page %d not found in pdf, not adding annotation %r' % (page, annotation), file=sys.stderr)
print >> sys.stderr, 'Page %d not found in pdf, not adding annotations %r' % (page, annotation)
continue
size = pdfpage.mediaBox
@ -66,25 +58,25 @@ def annotate(fp_in, annotations):
y = annotation['y']
if angle == 0:
x = float(x)
y = float(size[3]) - float(y) - 20
y = size[3] - float(y) - 20
elif angle == 90:
x, y = float(y) - 2, float(x) - 15
else:
x = float(x)
y = float(y)
print('Page rotated by %d degrees not implemented yet' % (angle), file=sys.stderr)
print >> sys.stderr, 'Page rotated by %d degrees not implemented yet' % (angle)
color = annotation.get('color', None)
if isinstance(color, basestring):
if color[:1] != '#':
print('Unsupported color format: %s' % (color), file=sys.stderr)
print >> sys.stderr, 'Unsupported color format: %s' % (color)
color = None
else:
# Assume HTML color with format "#RRGGBB".
try:
color = int(color[1:], 16)
except ValueError as e:
print('Unsupported color format: %s (%s)' % (color, e), file=sys.stderr)
print >> sys.stderr, 'Unsupported color format: %s (%s)' % (color, e)
color = None
if color is not None:
@ -121,6 +113,7 @@ def annotate(fp_in, annotations):
else:
annots.append(annoRef)
fp_out = BytesIO()
fp_out = StringIO()
pdf.write(fp_out)
return fp_out.getvalue()

View file

@ -1,22 +0,0 @@
version: '2'
services:
pdfdraw-server:
build:
context: .
dockerfile: docker/Dockerfile
environment:
port: 8080
secret: 'the-shared-secret'
#allow_invalid_certificates: null
#use_auto_ecdh_curve: null
#cmd_pdftk: ''
#cmd_svg2pdf: ''
#ports:
#- '8080:8080'
#networks:
# default:
# external:
# name: my-pre-existing-network

View file

@ -1,13 +0,0 @@
FROM nikolaik/python-nodejs:python3.9-nodejs15
ADD . /app
ADD docker/config.js.docker /app/config.js
RUN apt-get update || : && apt-get install pdftk python-pypdf2 -y
WORKDIR /app
RUN pip install svglib
RUN npm install
CMD ["node", "server.js"]

View file

@ -1,24 +0,0 @@
var config = {};
// The port the service should run on.
config.port = process.env.port || 8080;
// The shared secret for token validation. Must be the same value
// as configured in the Nextcloud admin interface.
config.secret = process.env.secret || 'the-shared-secret';
// INSECURE! Allow any self-signed / expired certificates.
// Only use this during development!
config.allow_invalid_certificates = process.env.allow_invalid_certificates || false;
// Required for newer versions of node / libssl.
// See https://github.com/nodejs/node/issues/21513#issuecomment-399790415
config.use_auto_ecdh_curve = process.env.use_auto_ecdh_curve || false;
// Command to use when running pdftk. Defaults to 'pdftk' if not configured.
config.cmd_pdftk = process.env.cmd_pdftk || '';
// Command to use when running svg2pdf. Defaults to 'svg2pdf' if not configured.
config.cmd_svg2pdf = process.env.cmd_svg2pdf || '';
module.exports = config;

627
server/package-lock.json generated
View file

@ -1,627 +0,0 @@
{
"name": "pdfdraw",
"version": "0.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "pdfdraw",
"version": "0.0.1",
"license": "AGPL-3.0",
"dependencies": {
"jsonwebtoken": "^9.0.2",
"socket.io": "^4.6.1"
}
},
"node_modules/@socket.io/component-emitter": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz",
"integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg=="
},
"node_modules/@types/cookie": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz",
"integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q=="
},
"node_modules/@types/cors": {
"version": "2.8.13",
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz",
"integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/node": {
"version": "18.15.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/base64id": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
"engines": {
"node": "^4.5.0 || >= 5.9"
}
},
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
},
"node_modules/cookie": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dependencies": {
"object-assign": "^4",
"vary": "^1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"dependencies": {
"safe-buffer": "^5.0.1"
}
},
"node_modules/engine.io": {
"version": "6.4.2",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz",
"integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==",
"dependencies": {
"@types/cookie": "^0.4.1",
"@types/cors": "^2.8.12",
"@types/node": ">=10.0.0",
"accepts": "~1.3.4",
"base64id": "2.0.0",
"cookie": "~0.4.1",
"cors": "~2.8.5",
"debug": "~4.3.1",
"engine.io-parser": "~5.0.3",
"ws": "~8.11.0"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/engine.io-parser": {
"version": "5.0.6",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz",
"integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
"integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
"dependencies": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1",
"semver": "^7.5.4"
},
"engines": {
"node": ">=12",
"npm": ">=6"
}
},
"node_modules/jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"dependencies": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
},
"node_modules/lodash.isboolean": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
},
"node_modules/lodash.isinteger": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
},
"node_modules/lodash.isnumber": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
},
"node_modules/lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
},
"node_modules/lodash.isstring": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
},
"node_modules/lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
},
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dependencies": {
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/socket.io": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz",
"integrity": "sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA==",
"dependencies": {
"accepts": "~1.3.4",
"base64id": "~2.0.0",
"debug": "~4.3.2",
"engine.io": "~6.4.1",
"socket.io-adapter": "~2.5.2",
"socket.io-parser": "~4.2.1"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/socket.io-adapter": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz",
"integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==",
"dependencies": {
"ws": "~8.11.0"
}
},
"node_modules/socket.io-parser": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz",
"integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==",
"dependencies": {
"@socket.io/component-emitter": "~3.1.0",
"debug": "~4.3.1"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/ws": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
"integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
},
"dependencies": {
"@socket.io/component-emitter": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz",
"integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg=="
},
"@types/cookie": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz",
"integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q=="
},
"@types/cors": {
"version": "2.8.13",
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz",
"integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==",
"requires": {
"@types/node": "*"
}
},
"@types/node": {
"version": "18.15.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw=="
},
"accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"requires": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
}
},
"base64id": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog=="
},
"buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
},
"cookie": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"requires": {
"ms": "2.1.2"
}
},
"ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"engine.io": {
"version": "6.4.2",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz",
"integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==",
"requires": {
"@types/cookie": "^0.4.1",
"@types/cors": "^2.8.12",
"@types/node": ">=10.0.0",
"accepts": "~1.3.4",
"base64id": "2.0.0",
"cookie": "~0.4.1",
"cors": "~2.8.5",
"debug": "~4.3.1",
"engine.io-parser": "~5.0.3",
"ws": "~8.11.0"
}
},
"engine.io-parser": {
"version": "5.0.6",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz",
"integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw=="
},
"jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
"integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
"requires": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1",
"semver": "^7.5.4"
}
},
"jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"requires": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"requires": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
},
"lodash.isboolean": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
},
"lodash.isinteger": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
},
"lodash.isnumber": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
},
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
},
"lodash.isstring": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
},
"lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
"yallist": "^4.0.0"
}
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"requires": {
"mime-db": "1.52.0"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"socket.io": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz",
"integrity": "sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA==",
"requires": {
"accepts": "~1.3.4",
"base64id": "~2.0.0",
"debug": "~4.3.2",
"engine.io": "~6.4.1",
"socket.io-adapter": "~2.5.2",
"socket.io-parser": "~4.2.1"
}
},
"socket.io-adapter": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz",
"integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==",
"requires": {
"ws": "~8.11.0"
}
},
"socket.io-parser": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz",
"integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==",
"requires": {
"@socket.io/component-emitter": "~3.1.0",
"debug": "~4.3.1"
}
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
},
"ws": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
"integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
"requires": {}
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
}

View file

@ -9,7 +9,7 @@
},
"main": "server.js",
"dependencies": {
"jsonwebtoken": "^9.0.2",
"socket.io": "^4.6.1"
"jsonwebtoken": "^8.4.0",
"socket.io": "^2.1.1"
}
}

View file

@ -20,10 +20,9 @@
## You should have received a copy of the GNU Affero General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
##
from __future__ import print_function
import argparse
from io import BytesIO
from cStringIO import StringIO
import json
import sys
@ -43,21 +42,21 @@ def main():
args = parser.parse_args()
try:
annotations = json.loads(open(args.text, 'rb').read())
except Exception as e:
annotations = json.loads(file(args.text, 'rb').read())
except Exception, e:
parser.error('Could not open/read text annotations: %s' % (e))
if args.input == '-':
fp_in = BytesIO(sys.stdin.read())
fp_in = StringIO(sys.stdin.read())
else:
fp_in = open(args.input, 'rb')
fp_in = file(args.input, 'rb')
pdf_data = annotate(fp_in, annotations)
if args.output == '-':
sys.stdout.write(pdf_data)
else:
with open(args.output, 'wb') as fp:
with file(args.output, 'wb') as fp:
fp.write(pdf_data)
if __name__ == '__main__':

View file

@ -463,57 +463,7 @@ function svg2pdf(svg_filename) {
});
}
function spawn(cmd, args, options) {
return new Promise((resolve, reject) => {
let stdin;
if (options && options.input) {
stdin = options.input;
delete options.input;
}
const proc = child_process.spawn(cmd, args, options);
if (stdin) {
proc.stdin.write(stdin, (error) => {
proc.stdin.end();
});
}
let data;
let errorData;
proc.on("message", console.log);
proc.stdout.on("data", chunk => {
if (!data) {
data = chunk;
} else {
data = Buffer.concat([data, chunk]);
}
});
proc.stderr.on("data", chunk => {
if (!errorData) {
errorData = chunk;
} else {
errorData = Buffer.concat([errorData, chunk]);
}
});
proc.on("close", function(code) {
resolve({
"status": code,
"stdout": data,
"stderr": errorData,
});
});
proc.on("error", function(err) {
reject(err);
});
});
}
async function combine_pdfs(pages, filename) {
function combine_pdfs(pages, filename) {
if (!pages.length) {
return false;
}
@ -524,7 +474,7 @@ async function combine_pdfs(pages, filename) {
args.push("cat");
args.push("output");
args.push(filename);
var status = await spawn(cmd, args);
var status = child_process.spawnSync(cmd, args);
console.log("Done", status.status);
if (status.status !== 0) {
if (status.stderr) {
@ -539,7 +489,7 @@ async function combine_pdfs(pages, filename) {
return true;
}
async function overlay_pdf(source_pdf, overlay_filename) {
function overlay_pdf(source_pdf, overlay_filename) {
if (!overlay_filename) {
return source_pdf;
}
@ -547,7 +497,7 @@ async function overlay_pdf(source_pdf, overlay_filename) {
var cmd = CMD_PDFTK;
console.log("Merging combined with overlay ...");
var args = ["-", "multistamp", overlay_filename, "output", "-"];
var status = await spawn(cmd, args, {
var status = child_process.spawnSync(cmd, args, {
"input": source_pdf,
});
console.log("Done", status.status);
@ -568,7 +518,7 @@ async function overlay_pdf(source_pdf, overlay_filename) {
return merged;
}
async function add_text_annotations(source_pdf, text, tempdir) {
function add_text_annotations(source_pdf, text, tempdir) {
if (!text || !text.length) {
return source_pdf;
}
@ -580,7 +530,7 @@ async function add_text_annotations(source_pdf, text, tempdir) {
fs.writeFileSync(text_filename, JSON.stringify(text));
var args = ["--text", text_filename, "-", "-"];
var status = await spawn(cmd, args, {
var status = child_process.spawnSync(cmd, args, {
"input": source_pdf,
});
console.log("Done", status.status);
@ -706,14 +656,11 @@ var runSvg2PdfCombiner = function(tempdir, data) {
Promise.all(promises)
.then(function(pdfs) {
var combined_filename = tempdir + "/combined.pdf";
combine_pdfs(pdfs, combined_filename)
.then((status) => {
if (!status) {
reject();
return;
}
resolve(combined_filename);
});
if (!combine_pdfs(pdfs, combined_filename)) {
reject();
return;
}
resolve(combined_filename);
})
.catch(function(error) {
reject(error);
@ -862,37 +809,33 @@ var server = http.createServer(function(request, response) {
return;
}
overlay_pdf(source_pdf, combined_filename)
.then((merged) => {
add_text_annotations(merged, data.text, tempdir)
.then((merged) => {
deleteFolderRecursive(tempdir);
if (!merged) {
response.writeHead(500, {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST",
"Access-Control-Allow-Headers": "Content-Type, Content-Disposition",
"Access-Control-Expose-Headers": "Content-Disposition",
"Content-Type": "text/plain"
});
response.end('Internal Server Error');
return;
}
var now = new Date();
var filename = getDownloadFilename(decoded.filename || room_id, now);
response.writeHead(200, {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST",
"Access-Control-Allow-Headers": "Content-Type, Content-Disposition",
"Access-Control-Expose-Headers": "Content-Disposition",
"Content-Type": "application/pdf",
"Content-Disposition": "attachment; filename=\"" + filename + "\"",
"Content-Length": merged.length
});
response.end(merged);
var merged = overlay_pdf(source_pdf, combined_filename);
merged = add_text_annotations(merged, data.text, tempdir);
deleteFolderRecursive(tempdir);
if (!merged) {
response.writeHead(500, {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST",
"Access-Control-Allow-Headers": "Content-Type, Content-Disposition",
"Access-Control-Expose-Headers": "Content-Disposition",
"Content-Type": "text/plain"
});
response.end('Internal Server Error');
return;
}
var now = new Date();
var filename = getDownloadFilename(decoded.filename || room_id, now);
response.writeHead(200, {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST",
"Access-Control-Allow-Headers": "Content-Type, Content-Disposition",
"Access-Control-Expose-Headers": "Content-Disposition",
"Content-Type": "application/pdf",
"Content-Disposition": "attachment; filename=\"" + filename + "\"",
"Content-Length": merged.length
});
response.end(merged);
})
.catch(function(error) {
deleteFolderRecursive(tempdir);
@ -911,12 +854,8 @@ var server = http.createServer(function(request, response) {
});
});
var io = socketio(server, {
'cors': {
'origin': '*',
},
'allowEIO3': true
});
var io = socketio(server);
io.set('origins', '*:*');
io.on('connection', function(socket) {
var query = socket.handshake.query;
@ -1011,13 +950,13 @@ io.on('connection', function(socket) {
room.sendMessage(socket, message);
});
socket.join(room_id);
var displayname = decoded.displayname || null;
var permissions = decoded.permissions || null;
room.addUser(socket, {
'displayname': displayname,
'permissions': permissions
socket.join(room_id, function() {
var displayname = decoded.displayname || null;
var permissions = decoded.permissions || null;
room.addUser(socket, {
'displayname': displayname,
'permissions': permissions
});
});
});

View file

@ -1,2 +0,0 @@
parserOptions:
sourceType: module

View file

@ -2,7 +2,7 @@
/** @var array $_ */
/** @var OCP\IURLGenerator $urlGenerator */
$urlGenerator = $_['urlGenerator'];
$version = \OC::$server->getAppManager()->getAppVersion('pdfdraw');
$version = \OCP\App::getAppVersion('pdfdraw');
?>
<!DOCTYPE html>
<!--
@ -27,7 +27,7 @@ Adobe CMap resources are covered by their own copyright but the same license:
See https://github.com/adobe-type-tools/cmap-resources
-->
<html dir="ltr" mozdisallowselectionprint>
<head data-workersrc="<?php p($urlGenerator->linkTo('pdfdraw', 'js/pdf.worker.js')) ?>?v=<?php p($version) ?>" data-cmapurl="<?php p($urlGenerator->linkTo('pdfdraw', '3rdparty/pdfjs/web/cmaps/')) ?>" data-socketurl="<?php p($_['server']) ?>" data-fileid="<?php p($_['fileId']) ?>" data-userid="<?php p($_['userId']) ?>" data-displayname="<?php p($_['displayName']) ?>" data-token="<?php p($_['token']) ?>" data-permissions="<?php p($_['permissions']) ?>">
<head data-workersrc="<?php p($urlGenerator->linkTo('pdfdraw', '3rdparty/pdfjs/build/pdf.worker.js')) ?>?v=<?php p($version) ?>" data-cmapurl="<?php p($urlGenerator->linkTo('pdfdraw', '3rdparty/pdfjs/web/cmaps/')) ?>" data-socketurl="<?php p($_['server']) ?>" data-fileid="<?php p($_['fileId']) ?>" data-userid="<?php p($_['userId']) ?>" data-displayname="<?php p($_['displayName']) ?>" data-token="<?php p($_['token']) ?>" data-permissions="<?php p($_['permissions']) ?>">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
@ -41,62 +41,47 @@ See https://github.com/adobe-type-tools/cmap-resources
<!-- This snippet is used in production (included from viewer.html) -->
<link rel="resource" type="application/l10n" href="<?php p($urlGenerator->linkTo('pdfdraw', '3rdparty/pdfjs/web/locale/locale.properties')) ?>?v=<?php p($version) ?>">
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', 'js/pdf.viewer.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', '3rdparty/pdfjs/build/pdf.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', '3rdparty/pdfjs/web/viewer.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', 'js/libs/jquery-3.3.1.min.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', 'js/libs/paper-0.11.8.min.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', 'js/libs/socket.io-2.1.1.min.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', 'js/libs/iro-4.5.0.min.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', 'js/libs/iro-transparency-plugin-1.0.2.min.js')) ?>?v=<?php p($version) ?>"></script>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('pdfdraw', 'js/pdfdraw.js')) ?>?v=<?php p($version) ?>"></script>
</head>
<body tabindex="1" class="loadingInProgress">
<div id="settingsDialog">
<div id="colorPicker"></div>
<div class="settings-field">
<label for="inputStrokeWidth">
<?php p($l->t('Stroke width')) ?>
<span id="strokeWidthValue"></span>
</label>
<input type="range" min="1" max="10" id="inputStrokeWidth" value="5"/>
</div>
<div id="colorPicker">
</div>
<div id="connectingMessage">
<?php p($l->t('Establishing connection, please wait...')) ?>
Establishing connection, please wait...
</div>
<div id="connectionError">
<?php p($l->t('The connection is interrupted, reconnecting...')) ?>
The connection is interrupted, reconnecting...
</div>
<div id="downloadInProgress">
<?php p($l->t('Generating combined PDF, please wait...')) ?>
Generating combined PDF, please wait...
</div>
<div id="downloadFailed">
<?php p($l->t('PDF generation failed, please try again later.')) ?>
PDF generation failed, please try again later.
</div>
<div id="outerContainer">
<div id="sidebarContainer">
<div id="toolbarSidebar">
<div id="toolbarSidebarLeft">
<div class="splitToolbarButton toggled">
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
<span data-l10n-id="thumbs_label">Thumbnails</span>
</button>
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
<span data-l10n-id="document_outline_label">Document Outline</span>
</button>
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
<span data-l10n-id="attachments_label">Attachments</span>
</button>
<button id="viewLayers" class="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabindex="5" data-l10n-id="layers">
<span data-l10n-id="layers_label">Layers</span>
</button>
</div>
</div>
<div id="toolbarSidebarRight">
<div id="outlineOptionsContainer" class="hidden">
<div class="verticalToolbarSeparator"></div>
<button id="currentOutlineItem" class="toolbarButton" disabled="disabled" title="Find Current Outline Item" tabindex="6" data-l10n-id="current_outline_item">
<span data-l10n-id="current_outline_item_label">Current Outline Item</span>
</button>
</div>
<div class="splitToolbarButton toggled">
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
<span data-l10n-id="thumbs_label">Thumbnails</span>
</button>
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
<span data-l10n-id="document_outline_label">Document Outline</span>
</button>
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
<span data-l10n-id="attachments_label">Attachments</span>
</button>
</div>
</div>
<div id="sidebarContent">
@ -106,8 +91,6 @@ See https://github.com/adobe-type-tools/cmap-resources
</div>
<div id="attachmentsView" class="hidden">
</div>
<div id="layersView" class="hidden">
</div>
</div>
<div id="sidebarResizer" class="hidden"></div>
</div> <!-- sidebarContainer -->
@ -195,9 +178,6 @@ See https://github.com/adobe-type-tools/cmap-resources
<div class="horizontalToolbarSeparator"></div>
<button id="scrollPage" class="secondaryToolbarButton scrollModeButtons scrollPage" title="Use Page Scrolling" tabindex="62" data-l10n-id="scroll_page">
<span data-l10n-id="scroll_page_label">Page Scrolling</span>
</button>
<button id="scrollVertical" class="secondaryToolbarButton scrollModeButtons scrollVertical toggled" title="Use Vertical Scrolling" tabindex="62" data-l10n-id="scroll_vertical">
<span data-l10n-id="scroll_vertical_label">Vertical Scrolling</span>
</button>
@ -230,31 +210,19 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="drawMenuToolbar" class="secondaryToolbar drawMenuToolbar hidden doorHangerRight hiddenReadonly">
<div id="drawModeToolbarButtonContainer">
<button id="freehandMode" class="modeButton toolbarButton freehandMode hiddenMediumView" title="<?php p($l->t('Freehand')) ?>" tabindex="34" data-l10n-id="freehand" data-mode="freehand">
<span data-l10n-id="freehand_label">
<?php p($l->t('Freehand')) ?>
</span>
<button id="freehandMode" class="modeButton toolbarButton freehandMode hiddenMediumView" title="Freehand" tabindex="34" data-l10n-id="freehand" data-mode="freehand">
<span data-l10n-id="freehand_label">Freehand</span>
</button>
<button id="rectangleMode" class="modeButton toolbarButton rectangleMode hiddenMediumView" title="<?php p($l->t('Rectangle')) ?>" tabindex="34" data-l10n-id="rectangle" data-mode="rectangle">
<span data-l10n-id="rectangle_label">
<?php p($l->t('Rectangle')) ?>
</span>
<button id="rectangleMode" class="modeButton toolbarButton rectangleMode hiddenMediumView" title="Rectangle" tabindex="34" data-l10n-id="rectangle" data-mode="rectangle">
<span data-l10n-id="rectangle_label">Rectangle</span>
</button>
<button id="ellipseMode" class="modeButton toolbarButton ellipseMode hiddenMediumView" title="<?php p($l->t('Ellipse')) ?>" tabindex="34" data-l10n-id="ellipse" data-mode="ellipse">
<span data-l10n-id="ellipse_label">
<?php p($l->t('Ellipse')) ?>
</span>
<button id="ellipseMode" class="modeButton toolbarButton ellipseMode hiddenMediumView" title="Ellipse" tabindex="34" data-l10n-id="ellipse" data-mode="ellipse">
<span data-l10n-id="ellipse_label">Ellipse</span>
</button>
<button id="lineMode" class="modeButton toolbarButton lineMode hiddenMediumView" title="<?php p($l->t('Line')) ?>" tabindex="34" data-l10n-id="line" data-mode="line">
<span data-l10n-id="line_label">
<?php p($l->t('Line')) ?>
</span>
</button>
<button id="textAnnotation" class="modeButton toolbarButton textMode hiddenMediumView" title="<?php p($l->t('Comment')) ?>" tabindex="34" data-l10n-id="text" data-mode="text">
<span data-l10n-id="text">
<?php p($l->t('Comment')) ?>
</span>
<button id="lineMode" class="modeButton toolbarButton lineMode hiddenMediumView" title="Line" tabindex="34" data-l10n-id="line" data-mode="line">
<span data-l10n-id="line_label">Line</span>
</button>
</div>
</div> <!-- drawMenuToolbar -->
@ -301,43 +269,29 @@ See https://github.com/adobe-type-tools/cmap-resources
<span data-l10n-id="bookmark_label">Current View</span>
</a>
<button id="noneMode" class="modeButton toolbarButton noneMode hiddenMediumView hiddenReadonly" title="<?php p($l->t('No tool')) ?>" tabindex="32" data-l10n-id="noneMode" data-mode="">
<span data-l10n-id="noneMode_label">
<?php p($l->t('No tool')); ?>
</span>
<button id="noneMode" class="modeButton toolbarButton noneMode hiddenMediumView hiddenReadonly" title="No tool" tabindex="32" data-l10n-id="noneMode" data-mode="">
<span data-l10n-id="noneMode_label">No tool</span>
</button>
<button id="selectMode" class="modeButton toolbarButton selectMode hiddenMediumView hiddenReadonly" title="<?php p($l->t('Select')) ?>" tabindex="32" data-l10n-id="selectMode" data-mode="select">
<span data-l10n-id="selectMode_label">
<?php p($l->t('Select')); ?>
</span>
<button id="selectMode" class="modeButton toolbarButton selectMode hiddenMediumView hiddenReadonly" title="Select" tabindex="32" data-l10n-id="selectMode" data-mode="select">
<span data-l10n-id="selectMode_label">Select</span>
</button>
<button id="pointerMode" class="modeButton toolbarButton pointerMode hiddenMediumView hiddenReadonly" title="<?php p($l->t('Pointer')); ?>" tabindex="33" data-l10n-id="pointer" data-mode="pointer">
<span data-l10n-id="pointer_label">
<?php p($l->t('Pointer')) ?>
</span>
<button id="pointerMode" class="modeButton toolbarButton pointerMode hiddenMediumView hiddenReadonly" title="Pointer" tabindex="33" data-l10n-id="pointer" data-mode="pointer">
<span data-l10n-id="pointer_label">Pointer</span>
</button>
<button id="drawModeToolbar" class="toolbarButton drawMode freehandMode toggle hiddenReadonly" title="<?php p($l->t('Draw mode')) ?>" tabindex="36" data-l10n-id="draw_mode">
<span data-l10n-id="tools_label">
<?php p($l->t('Draw mode')); ?>
</span>
<button id="drawModeToolbar" class="toolbarButton drawMode freehandMode toggle hiddenReadonly" title="Draw mode" tabindex="36" data-l10n-id="draw_mode">
<span data-l10n-id="tools_label">Draw mode</span>
<span class="dropdown"></span>
</button>
<button id="colorMode" class="modeButton toolbarButton colorMode hiddenMediumView hiddenReadonly" title="<?php p($l->t('Select color')) ?>" tabindex="35" data-l10n-id="color" data-mode="color">
<span data-l10n-id="color_label">
<?php p($l->t('Select color')) ?>
</span>
<button id="colorMode" class="modeButton toolbarButton colorMode hiddenMediumView hiddenReadonly" title="Select color" tabindex="35" data-l10n-id="color" data-mode="color">
<span data-l10n-id="color_label">Select color</span>
</button>
<button id="downloadPdf" class="toolbarButton download hiddenMediumView" title="<?php p($l->t('Download')) ?>" tabindex="36">
<span>
<?php p($l->t('Download')) ?>
</span>
<button id="downloadPdf" class="toolbarButton download hiddenMediumView" title="Download" tabindex="36" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span>
</button>
<button id="secondaryToolbarClose" class="toolbarButton close" title="<?php p($l->t('Close')) ?>" tabindex="37" data-l10n-id="Close">
<span data-l10n-id="close_label">
<?php p($l->t('Close')) ?>
</span>
<button id="secondaryToolbarClose" class="toolbarButton close" title="Close" tabindex="37" data-l10n-id="Close">
<span data-l10n-id="close_label">Close</span>
</button>
<div class="verticalToolbarSeparator hiddenSmallView"></div>
@ -506,3 +460,4 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="printContainer"></div>
</body>
</html>

View file

@ -1,180 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the Nextcloud package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Joachim Bauch <mail@joachim-bauch.de>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Nextcloud 3.14159\n"
"Report-Msgid-Bugs-To: translations\\@example.com\n"
"POT-Creation-Date: 2022-03-14 09:47+0100\n"
"PO-Revision-Date: 2021-12-07 15:44+0000\n"
"Last-Translator: Joachim Bauch <mail@joachim-bauch.de>, 2022\n"
"Language-Team: German (https://www.transifex.com/strukturag/teams/115058/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Controller/ViewerController.php:151
msgid "FileId is empty."
msgstr "Keine FileId übergeben."
#: lib/Controller/ViewerController.php:162
#: lib/Controller/ViewerController.php:213
#: lib/Controller/ViewerController.php:219
msgid "File not found."
msgstr "Datei wurde nicht gefunden."
#: lib/Controller/ViewerController.php:167
#: lib/Controller/ViewerController.php:186
#: lib/Controller/ViewerController.php:192
#: lib/Controller/ViewerController.php:206
msgid "You do not have enough permissions to view the file."
msgstr "Sie haben keine ausreichenden Berechtigungen, um die Datei zu öffnen."
#: lib/Controller/ViewerController.php:174
msgid "Token is empty."
msgstr "Kein Token übergeben."
#: lib/Controller/ViewerController.php:275
#, php-format
msgid "File %s is not a PDF file (%s)."
msgstr "Datei %s ist kein PDF Dokument (%s)."
#: lib/Controller/ViewerController.php:312
msgid "No backend configured."
msgstr "Kein Backend konfiguriert."
#: lib/Controller/ViewerController.php:456
msgid "Invalid token."
msgstr "Ungültiger Token."
#: lib/Controller/ViewerController.php:473
msgid "Access denied."
msgstr "Zugriff verweigert."
#: lib/Settings/Admin/Section.php:77
#: specialAppInfoFakeDummyForL10nScript.php:2
#: templates/settings/admin/backend.php:9
msgid "PDF Annotations"
msgstr "PDF Annotationen"
#: specialAppInfoFakeDummyForL10nScript.php:3
msgid "Annotate PDF documents"
msgstr "PDF Dokumente annotieren"
#: specialAppInfoFakeDummyForL10nScript.php:4
msgid ""
"PDF annotations for Nextcloud\n"
"\n"
"Annotate any PDF document collaboratively inside Nextcloud. Select \"Annotate\" from the context menu of PDF files to open the annotation mode.\n"
"\n"
"Requires a separate nodejs server running on the backend to distribute the signaling messages between clients.\n"
"The server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server)."
msgstr ""
"PDF Annotationen für Nextcloud\n"
"\n"
"Annotieren Sie beliebige PDF Dokumente gemeinsam in Nextcloud. Wählen Sie \"Annotieren\" aus dem Kontext-Menü von PDF Dateien, um den Annotations-Modus zu öffnen.\n"
"\n"
"Benötigt einen separaten nodejs Server als Backend, um Nachrichten zwischen Clients auszutauschen. Der Server ist auf [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server) verfügbar."
#: src/loader.js:42 src/loader.js:96
msgid "Annotate"
msgstr "Annotieren"
#: src/loader.js:105
msgid "Open"
msgstr "Öffnen"
#: templates/settings/admin/backend.php:11
#: templates/settings/admin/backend.php:13
msgid "Backend server"
msgstr "Backend-Server"
#: templates/settings/admin/backend.php:13
msgid "https://server.domain.invalid/path/"
msgstr "https://server.domain.invalid/path/"
#: templates/settings/admin/backend.php:14
#: templates/settings/admin/backend.php:20
msgid "Saved"
msgstr "Gespeichert"
#: templates/settings/admin/backend.php:17
#: templates/settings/admin/backend.php:19
msgid "Shared secret"
msgstr "Geteiltes Geheimnis"
#: templates/viewer.php:54
msgid "Stroke width"
msgstr "Linienbreite"
#: templates/viewer.php:61
msgid "Establishing connection, please wait..."
msgstr "Verbindung wird hergestellt, bitte warten..."
#: templates/viewer.php:64
msgid "The connection is interrupted, reconnecting..."
msgstr "Die Verbindung ist unterbrochen, verbinde neu..."
#: templates/viewer.php:67
msgid "Generating combined PDF, please wait..."
msgstr "Zusammengefügtes PDF wird erstellt, bitte warten..."
#: templates/viewer.php:70
msgid "PDF generation failed, please try again later."
msgstr "PDF Erzeugung fehlgeschlagen, bitte versuchen Sie es später nochmal."
#: templates/viewer.php:233 templates/viewer.php:235
msgid "Freehand"
msgstr "Freihand"
#: templates/viewer.php:238 templates/viewer.php:240
msgid "Rectangle"
msgstr "Rechteck"
#: templates/viewer.php:243 templates/viewer.php:245
msgid "Ellipse"
msgstr "Ellipse"
#: templates/viewer.php:248 templates/viewer.php:250
msgid "Line"
msgstr "Linie"
#: templates/viewer.php:253 templates/viewer.php:255
msgid "Comment"
msgstr "Kommentar"
#: templates/viewer.php:304 templates/viewer.php:306
msgid "No tool"
msgstr "Nichts wählen"
#: templates/viewer.php:309 templates/viewer.php:311
msgid "Select"
msgstr "Auswählen"
#: templates/viewer.php:314 templates/viewer.php:316
msgid "Pointer"
msgstr "Zeiger"
#: templates/viewer.php:320 templates/viewer.php:322
msgid "Draw mode"
msgstr "Zeichenmodus"
#: templates/viewer.php:327 templates/viewer.php:329
msgid "Select color"
msgstr "Farbe wählen"
#: templates/viewer.php:332 templates/viewer.php:334
msgid "Download"
msgstr "Herunterladen"
#: templates/viewer.php:337 templates/viewer.php:339
msgid "Close"
msgstr "Schließen"

View file

@ -1,178 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the Nextcloud package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Joachim Bauch <mail@joachim-bauch.de>, 2021
# Maria Puerta, 2021
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Nextcloud 3.14159\n"
"Report-Msgid-Bugs-To: translations\\@example.com\n"
"POT-Creation-Date: 2021-12-08 14:42+0100\n"
"PO-Revision-Date: 2021-12-07 15:44+0000\n"
"Last-Translator: Maria Puerta, 2021\n"
"Language-Team: Spanish (https://www.transifex.com/strukturag/teams/115058/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Controller/ViewerController.php:151
msgid "FileId is empty."
msgstr "File ID está vacío."
#: lib/Controller/ViewerController.php:162
#: lib/Controller/ViewerController.php:213
#: lib/Controller/ViewerController.php:219
msgid "File not found."
msgstr "Archivo no encontrado."
#: lib/Controller/ViewerController.php:167
#: lib/Controller/ViewerController.php:186
#: lib/Controller/ViewerController.php:192
#: lib/Controller/ViewerController.php:206
msgid "You do not have enough permissions to view the file."
msgstr "No tiene suficientes permisos para ver el archivo."
#: lib/Controller/ViewerController.php:174
msgid "Token is empty."
msgstr "El Token está vacío."
#: lib/Controller/ViewerController.php:275
#, php-format
msgid "File %s is not a PDF file (%s)."
msgstr "El archivo %s no es un archivo PDF (%s)."
#: lib/Controller/ViewerController.php:312
msgid "No backend configured."
msgstr "No se ha configurado la Base de datos."
#: lib/Controller/ViewerController.php:456
msgid "Invalid token."
msgstr "Token inválido."
#: lib/Controller/ViewerController.php:473
msgid "Access denied."
msgstr "Acceso denegado."
#: lib/Settings/Admin/Section.php:77
#: specialAppInfoFakeDummyForL10nScript.php:2
#: templates/settings/admin/backend.php:9
msgid "PDF Annotations"
msgstr "Anotaciones en PDF"
#: specialAppInfoFakeDummyForL10nScript.php:3
msgid "Annotate PDF documents"
msgstr "Anotar en documentos PDF"
#: specialAppInfoFakeDummyForL10nScript.php:4
msgid ""
"PDF annotations for Nextcloud\n"
"\n"
"Annotate any PDF document collaboratively inside Nextcloud. Select \"Annotate\" from the context menu of PDF files to open the annotation mode.\n"
"\n"
"Requires a separate nodejs server running on the backend to distribute the signaling messages between clients.\n"
"The server is available on [GitHub](https://github.com/strukturag/pdfdraw/tree/master/server)."
msgstr ""
"Anotaciones en PDF para Nextcloud. \n"
"\n"
"Anota en cualquier documento PDF en modo compartido dentro de Nextcloud. Seleccione \"Anotar\" en el menú contextual de los archivos PDF para abrir el modo de anotación. \n"
"\n"
"Requiere un servidor nodejs independiente que se ejecute en la Base de datos para distribuir los mensajes de anotación entre los clientes. \n"
"El servidor está disponible en [GitHub]. (https://github.com/strukturag/pdfdraw/tree/master/server)."
#: src/loader.js:42 src/loader.js:96
msgid "Annotate"
msgstr "Anotar"
#: src/loader.js:105
msgid "Open"
msgstr "Abrir"
#: templates/settings/admin/backend.php:11
#: templates/settings/admin/backend.php:13
msgid "Backend server"
msgstr "Servidor de Base de Datos"
#: templates/settings/admin/backend.php:13
msgid "https://server.domain.invalid/path/"
msgstr "https://server.domain.invalid/path/"
#: templates/settings/admin/backend.php:14
#: templates/settings/admin/backend.php:20
msgid "Saved"
msgstr "Guardado"
#: templates/settings/admin/backend.php:17
#: templates/settings/admin/backend.php:19
msgid "Shared secret"
msgstr "Secreta compartida"
#: templates/viewer.php:54
msgid "Stroke width"
msgstr "Ancho de linea"
#: templates/viewer.php:61
msgid "Establishing connection, please wait..."
msgstr "Estableciendo conexión, por favor espere..."
#: templates/viewer.php:64
msgid "The connection is interrupted, reconnecting..."
msgstr "La conexión esta interrumpida, volviendo a conectar..."
#: templates/viewer.php:67
msgid "Generating combined PDF, please wait..."
msgstr "Generando PDF combinado, por favor espere..."
#: templates/viewer.php:70
msgid "PDF generation failed, please try again later."
msgstr "Error al generar el PDF, por favor inténtelo más tarde."
#: templates/viewer.php:230 templates/viewer.php:232
msgid "Freehand"
msgstr "Mano alzada"
#: templates/viewer.php:235 templates/viewer.php:237
msgid "Rectangle"
msgstr "rectángulo"
#: templates/viewer.php:240 templates/viewer.php:242
msgid "Ellipse"
msgstr "Elipse"
#: templates/viewer.php:245 templates/viewer.php:247
msgid "Line"
msgstr "Linea"
#: templates/viewer.php:297 templates/viewer.php:299
msgid "No tool"
msgstr "Ninguna herramienta"
#: templates/viewer.php:302 templates/viewer.php:304
msgid "Select"
msgstr "Seleccionar"
#: templates/viewer.php:307 templates/viewer.php:309
msgid "Pointer"
msgstr "Puntero"
#: templates/viewer.php:313 templates/viewer.php:315
msgid "Draw mode"
msgstr "Modo de dibujo"
#: templates/viewer.php:320 templates/viewer.php:322
msgid "Select color"
msgstr "Seleccionar color"
#: templates/viewer.php:325 templates/viewer.php:327
msgid "Download"
msgstr "Descargar"
#: templates/viewer.php:330 templates/viewer.php:332
msgid "Close"
msgstr "Cerrar"

View file

@ -1,187 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the Nextcloud package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Nextcloud 3.14159\n"
"Report-Msgid-Bugs-To: translations\\@example.com\n"
"POT-Creation-Date: 2022-03-14 09:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: lib/Controller/ViewerController.php:151
msgid "FileId is empty."
msgstr ""
#: lib/Controller/ViewerController.php:162
#: lib/Controller/ViewerController.php:213
#: lib/Controller/ViewerController.php:219
msgid "File not found."
msgstr ""
#: lib/Controller/ViewerController.php:167
#: lib/Controller/ViewerController.php:186
#: lib/Controller/ViewerController.php:192
#: lib/Controller/ViewerController.php:206
msgid "You do not have enough permissions to view the file."
msgstr ""
#: lib/Controller/ViewerController.php:174
msgid "Token is empty."
msgstr ""
#: lib/Controller/ViewerController.php:275
#, php-format
msgid "File %s is not a PDF file (%s)."
msgstr ""
#: lib/Controller/ViewerController.php:312
msgid "No backend configured."
msgstr ""
#: lib/Controller/ViewerController.php:456
msgid "Invalid token."
msgstr ""
#: lib/Controller/ViewerController.php:473
msgid "Access denied."
msgstr ""
#: lib/Settings/Admin/Section.php:77
#: specialAppInfoFakeDummyForL10nScript.php:2
#: templates/settings/admin/backend.php:9
msgid "PDF Annotations"
msgstr ""
#: specialAppInfoFakeDummyForL10nScript.php:3
msgid "Annotate PDF documents"
msgstr ""
#: specialAppInfoFakeDummyForL10nScript.php:4
msgid ""
"PDF annotations for Nextcloud\n"
"\n"
"Annotate any PDF document collaboratively inside Nextcloud. Select \"Annotate"
"\" from the context menu of PDF files to open the annotation mode.\n"
"\n"
"Requires a separate nodejs server running on the backend to distribute the "
"signaling messages between clients.\n"
"The server is available on [GitHub](https://github.com/strukturag/pdfdraw/"
"tree/master/server)."
msgstr ""
#: src/loader.js:42
#: src/loader.js:96
msgid "Annotate"
msgstr ""
#: src/loader.js:105
msgid "Open"
msgstr ""
#: templates/settings/admin/backend.php:11
#: templates/settings/admin/backend.php:13
msgid "Backend server"
msgstr ""
#: templates/settings/admin/backend.php:13
msgid "https://server.domain.invalid/path/"
msgstr ""
#: templates/settings/admin/backend.php:14
#: templates/settings/admin/backend.php:20
msgid "Saved"
msgstr ""
#: templates/settings/admin/backend.php:17
#: templates/settings/admin/backend.php:19
msgid "Shared secret"
msgstr ""
#: templates/viewer.php:54
msgid "Stroke width"
msgstr ""
#: templates/viewer.php:61
msgid "Establishing connection, please wait..."
msgstr ""
#: templates/viewer.php:64
msgid "The connection is interrupted, reconnecting..."
msgstr ""
#: templates/viewer.php:67
msgid "Generating combined PDF, please wait..."
msgstr ""
#: templates/viewer.php:70
msgid "PDF generation failed, please try again later."
msgstr ""
#: templates/viewer.php:233
#: templates/viewer.php:235
msgid "Freehand"
msgstr ""
#: templates/viewer.php:238
#: templates/viewer.php:240
msgid "Rectangle"
msgstr ""
#: templates/viewer.php:243
#: templates/viewer.php:245
msgid "Ellipse"
msgstr ""
#: templates/viewer.php:248
#: templates/viewer.php:250
msgid "Line"
msgstr ""
#: templates/viewer.php:253
#: templates/viewer.php:255
msgid "Comment"
msgstr ""
#: templates/viewer.php:304
#: templates/viewer.php:306
msgid "No tool"
msgstr ""
#: templates/viewer.php:309
#: templates/viewer.php:311
msgid "Select"
msgstr ""
#: templates/viewer.php:314
#: templates/viewer.php:316
msgid "Pointer"
msgstr ""
#: templates/viewer.php:320
#: templates/viewer.php:322
msgid "Draw mode"
msgstr ""
#: templates/viewer.php:327
#: templates/viewer.php:329
msgid "Select color"
msgstr ""
#: templates/viewer.php:332
#: templates/viewer.php:334
msgid "Download"
msgstr ""
#: templates/viewer.php:337
#: templates/viewer.php:339
msgid "Close"
msgstr ""

View file

@ -1,11 +0,0 @@
{
"config": {
"platform": {
"php": "7.4"
},
"sort-packages": true
},
"require": {
"coenjacobs/mozart": "^0.7.1"
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,44 +0,0 @@
/* eslint-env node */
const path = require('path');
const CopyPlugin = require("copy-webpack-plugin");
const TerserPlugin = require('terser-webpack-plugin');
const package = require('./package.json');
const versionPdfJs = package.dependencies['pdfjs-dist'];
const versionPdfJsViewer = package.dependencies['pdfjs-dist-viewer-min'];
if (versionPdfJs !== versionPdfJsViewer) {
throw new Error('PDF.js (' + versionPdfJs + ') and the viewer (' + versionPdfJsViewer + ') must use the same versions.');
}
module.exports = {
entry: {
'loader': path.join(__dirname, 'src', 'loader.js'),
'pdfdraw': path.join(__dirname, 'src', 'pdfdraw.js'),
'admin/backend': path.join(__dirname, 'src', 'admin', 'backend.js'),
'pdf.worker': path.join(__dirname, 'node_modules', 'pdfjs-dist', 'build', 'pdf.worker.js'),
},
externals: {
"pdfjs-dist-viewer-min": "window",
"pdfjs-dist": "window",
},
output: {
filename: '[name].js',
path: __dirname + '/js',
},
optimization: {
minimizer: [new TerserPlugin({
extractComments: false,
})],
},
plugins: [
new CopyPlugin({
patterns: [
{ from: "node_modules/pdfjs-dist/cmaps/", to: "../3rdparty/pdfjs/web/cmaps/" },
{ from: "node_modules/pdfjs-dist-viewer-min/build/minified/web/viewer.css", to: "../3rdparty/pdfjs/web/viewer.css" },
{ from: "node_modules/pdfjs-dist-viewer-min/build/minified/web/images/", to: "../3rdparty/pdfjs/web/images/" },
{ from: "node_modules/pdfjs-dist-viewer-min/build/minified/web/locale/", to: "../3rdparty/pdfjs/web/locale/" },
{ from: "node_modules/pdfjs-dist-viewer-min/build/minified/web/pdf.viewer.js", to: "pdf.viewer.js" },
],
}),
],
};