GithubHelp home page GithubHelp logo

strukturag / pdfdraw Goto Github PK

View Code? Open in Web Editor NEW
43.0 6.0 10.0 3.25 MB

Nextcloud app to annotate PDF documents

License: GNU Affero General Public License v3.0

Makefile 1.39% PHP 34.19% SCSS 0.23% CSS 3.38% JavaScript 55.38% Python 5.29% Dockerfile 0.14%
nextcloud app pdf javascript node socketio socket-io

pdfdraw's Introduction

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/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.