No description
Find a file
2021-11-11 12:04:05 +01:00
.github dependabot: Check for updates of server dependencies. 2021-11-11 11:37:24 +01: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 Next version will be 0.1.2 2020-12-14 09:10:56 +01:00
css close button size fix 2020-12-14 22:55:57 +01:00
img Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
lib Only allow opening PDF files. 2021-11-10 11:48:38 +01:00
screenshots Add screenshots (#2). 2020-11-30 17:42:11 +01:00
server Bump socket.io from 2.3.0 to 4.3.2 in /server 2021-11-11 10:38:01 +00:00
src No longer need separate iro-transparency-plugin, now part of the core. 2021-11-11 11:33:59 +01:00
templates Manage dependencies through npm. 2021-11-10 16:57:34 +01:00
.eslintignore Manage dependencies through npm. 2021-11-10 16:57:34 +01:00
.eslintrc.yml Manage dependencies through npm. 2021-11-10 16:57:34 +01:00
.gitignore npm: Keep package-lock.json in the repository. 2021-11-11 11:37:01 +01:00
.gitmodules Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
.stylelintrc Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
LICENSE Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
Makefile Manage dependencies through npm. 2021-11-10 16:57:34 +01:00
package-lock.json Bump socket.io-client from 2.1.1 to 4.3.2 2021-11-11 10:38:16 +00:00
package.json Bump socket.io-client from 2.1.1 to 4.3.2 2021-11-11 10:38:16 +00:00
README.md Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
run-eslint.sh Manage dependencies through npm. 2021-11-10 16:57:34 +01:00
run-stylelint.sh Initial Open Source checkin of version 0.1.0. 2020-11-25 15:38:38 +01:00
webpack.js Manage dependencies through npm. 2021-11-10 16:57:34 +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.