项目作者: strukturag

项目描述 :
Nextcloud app to annotate PDF documents
高级语言: JavaScript
项目地址: git://github.com/strukturag/pdfdraw.git
创建时间: 2020-11-25T14:34:09Z
项目社区:https://github.com/strukturag/pdfdraw

开源协议:GNU Affero General Public License v3.0

下载


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:

  1. upstream pdfdraw {
  2. server 127.0.0.1:8080;
  3. }
  4. server {
  5. ... other configuration for Nextcloud ...
  6. location /socket.io {
  7. proxy_pass http://pdfdraw/socket.io;
  8. proxy_http_version 1.1;
  9. proxy_set_header Upgrade $http_upgrade;
  10. proxy_set_header Connection "Upgrade";
  11. proxy_set_header Host $host;
  12. proxy_set_header X-Real-IP $remote_addr;
  13. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  14. }
  15. location /download/ {
  16. proxy_pass http://pdfdraw/download/;
  17. proxy_http_version 1.1;
  18. proxy_set_header Host $host;
  19. proxy_set_header X-Real-IP $remote_addr;
  20. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  21. }
  22. }

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/