Skip to content

documandev/froide-redact

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redaction in the browser

How it works:

  1. PDF is converted to HTML with html2pdfEx
  2. HTML is loaded in the browser and redacted in the browser
  3. Serialized redaction operations (text selections, image black outs) are sent to the server
  4. Server loads HTML into phantomjs, applies redaction operations and either returns the redacted HTML or prints page back to PDF

Installation

On your machine

Install html2pdfEx and phantomjs.

pip install -r requirements.txt
python manage.py runserver

Then visit: http://localhost:8000/?url=http://localhost:8000/static/example.pdf

Using docker

docker build -t froide_redact .
docker run -p 8000:8000 -i -t froide_redact

Then visit: http://localdocker:8000/?url=http://localdocker:8000/static/example.pdf

Usage

The links above open a sample pdf rendered as html.

  • Select parts of the text to redact that part
  • Click on links to remove the links (probably doesn't work yet)
  • Draw rectangles on images to redact them (a bit broken still)

Click one of the redact buttons at the top and get back either HTML or PDF. HTML may work better.

Issues

Stil a couple, see Issues.

Credits

Based on the initial prototype called Foist and long research with Tony Bowden and Anton Stoychev sponsored by MySociety.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.9%
  • Python 2.1%
  • HTML 1.0%