No description
Find a file
2022-04-27 13:02:20 +02:00
.github Bump actions/cache from 2 to 3 2022-03-21 10:56:15 +00:00
.tx Add Transifex config. 2020-11-25 16:09:19 +01:00
3rdparty Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
appinfo Add translation support and German texts. 2021-12-07 16:44:26 +01:00
css Prevent selecting static text on text annotations. 2022-03-01 16:01:34 +01:00
img Add support for text annotations. 2022-03-01 16:01:33 +01:00
l10n Update translations from 0400a4d7a1 2022-03-14 09:52:28 +01:00
lib Add translation support and German texts. 2021-12-07 16:44:26 +01:00
screenshots Add screenshots (#2). 2020-11-30 17:42:11 +01:00
server Make sure to calculate with float objects. 2022-03-02 15:29:48 +01:00
src Set title of author node (which might get clipped). 2022-03-01 16:01:35 +01:00
templates Update wording for text annotations. 2022-03-14 09:48:52 +01:00
translationfiles Apply translations in de 2022-03-14 08:50:06 +00:00
.eslintignore Manage dependencies through npm. 2021-11-10 16:57:34 +01:00
.eslintrc.yml Run eslint through npm. 2021-11-11 14:10:52 +01:00
.gitignore Add translation support and German texts. 2021-12-07 16:44:26 +01:00
.gitmodules Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
.l10nignore Add translation support and German texts. 2021-12-07 16:44:26 +01:00
.stylelintrc Run stylelint through npm. 2021-11-11 14:13:49 +01:00
CHANGELOG.md Add changelog. 2021-12-09 09:40:50 +01:00
LICENSE Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
Makefile make: Build with pinned dependencies. 2022-01-27 14:58:57 +01:00
package-lock.json Bump stylelint from 14.7.1 to 14.8.0 2022-04-27 10:29:48 +00:00
package.json Bump stylelint from 14.7.1 to 14.8.0 2022-04-27 10:29:48 +00:00
README.md Add note on using Transifex for translations. 2021-12-08 09:27:03 +01:00
webpack.js Ensure pdf.js and the viewer are using the same versions. 2021-11-22 15:15:08 +01:00

PDF Annotations for Nextcloud

Installation

  • Clone the repository to the apps folder of Nextcloud. Make sure to clone recursively with submodules or run git submodule update --init afterwards to fetch third-party components.
  • Execute make in the checkout folder to fetch other third-party dependencies.

Server

The backend server is located in the server subfolder, see the README.md there for further information.

Nginx configuration

Add the following to the nginx server configuration so the pdfdraw server runs behind nginx, utilizing the same SSL settings:

upstream pdfdraw {
    server 127.0.0.1:8080;
}

server {

    ... other configuration for Nextcloud ...

    location /socket.io {
        proxy_pass http://pdfdraw/socket.io;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /download/ {
        proxy_pass http://pdfdraw/download/;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

}

Nextcloud configuration

The server address and shared secret can be configured in the Nextcloud admin settings in section PDF Annotations.

Events

Other apps can override the name that is shown in the list of users currently annotating a document.

For that the app dispatches an event OCA\PdfDraw::getDisplayName. The event has an argument displayName which contains the default display name. Logged in Nextcloud users will use their display name. All other (anonymous) users 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/