Giter Site home page Giter Site logo

pdf-access's Introduction

pdf-access

GitHub Build Status CodeQL Coverage Status

pdf-access makes pdf documents more accessible to screen readers and other assistive technologies.

It uses a toml configuration file to specify a plan, match certain documents, and apply a list of actions to remediate a document.

Here is an example of a toml file that will unlock and remove text that is preventing a screen reader from reading the documents authored by Mom.

Other documents will be trimmed down to a single page compressed.

#----------------- Sources -----------------

[sources.my_pdfs]
in_path = "./originals"
out_path = "./accessible"

#----------------- Plans -------------------

[plans.unlock-compress]
actions = ["clear_encoding_differences"]
# match documents from Mom
metadata_search = { "author" = "Mom" }
passwords = ["c@11-y0ur-m0+h3r", "w3@r-c13@n-und3rw34r"]
post_process = ["gs-compress"]

[plans.compress-and-trim]
actions = ["single-page"]
# match everything else
metadata_search = {}
post_process = ["gs-compress"]

#----------------- Actions -----------------

[actions.clear_encoding_differences]
name = "Clear encoding differences"
function = "clear-encoding-differences"

[actions.single-page]
name = "Keep one page"
function = "keep-pages"
args.pages = [0]

To run the plan, you would use the following command:

pdf-access config.toml

The files in the ./originals directory would be processed and the results would be placed in the ./accessible directory.

Installation

pip install git+https://github.com/felddy/pdf-access.git

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

License

This project is in the worldwide public domain.

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

pdf-access's People

Contributors

mcdonnnj avatar felddy avatar jsf9k avatar jasonodoom avatar dependabot[bot] avatar jmorrowomni avatar dav3r avatar hillaryj avatar step-security-bot avatar arcsector avatar

Stargazers

 avatar

Watchers

 avatar

pdf-access's Issues

Convert build process to use reusable workflows

๐Ÿ’ก Summary

Refactor to use my reusable-workflows repository.

Motivation and context

This will be a good next-step for the reusable-workflows, and a test for use at CISA.

Implementation notes

Please provide details for implementation, such as:

  • look at the foundryvtt-docker repo's use of reusable-workflows
  • update reusable-workflows to support a Python build

Acceptance criteria

How do we know when this work is done?

  • Project uses reusable-workflows successfully.

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.