Giter VIP home page Giter VIP logo

overlay-link-to-pdf's Introduction

INSTALL

Debian/Ubuntu

apt-get install python3-reportlab python3-pip python3-progressbar fonts-dejavu
pip3 install pypdf2 --system
pip3 install python-magic --system

USAGE

For single PDF

./overlaylink2pdf.py -w 'My watermark' -l https://my.domain.local -s 9 -p top-middle -i ./documents -o ./result --prefix my.domain.local- --validate trustworthy
  • -i/--input - input file, required
  • -o/--output - output file
  • -w/--watermark - watermark, required
  • -l/--link - link, required
  • -s/--font-size - fontsize, default = '0'
  • -f/--font - font, default = 'DejaVuSans'
  • -c/--color - color, default = '0645AD'
  • -p/--position - position watermark, ["top-left", "top-middle", "top-right", "bottom-left", "bottom-middle", "bottom-right"], default = 'top-left'
  • --prefix - prefix output file, default = ''
  • --validate - validate output file as PDF, ['lazy', 'trustworthy'], default = 'lazy'

For folder with PDF

./batch_overlaylink2pdf.py -w 'My watermark' -l https://my.domain.local -s 14 -p bottom-right -i ./documents -o ./result -r --prefix my.domain.local- --validate trustworthy
  • -i/--input - input folder, default = '.'
  • -o/--output - output folder, default = '.'
  • -w/--watermark - watermark, required
  • -l/--link - link, required
  • -s/--font-size - fontsize, default = '0'
  • -f/--font - font, default = 'DejaVuSans'
  • -c/--color - color, default = '0645AD'
  • -p/--position - position watermark, ["top-left", "top-middle", "top-right", "bottom-left", "bottom-middle", "bottom-right"], default = 'top-left'
  • -r/--recursive - recursive, default = 'false'
  • --prefix - prefix output file, default = ''
  • --validate - validate output file as PDF, ['lazy', 'trustworthy'], default = 'lazy'

NOTE

Script is based on https://forum.ubuntu.ru/index.php?topic=275095.msg2173044#msg2173044

overlay-link-to-pdf's People

Contributors

alex-79 avatar

Watchers

 avatar  avatar

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.