Sign inSign up

pdfix/autotag-textract

By pdfix

Updated about 1 month ago

Image
0

2.6K

pdfix/autotag-textract repository overview

PDF Accessibility Amazon Textract

A Docker image that automatically tags a PDF or creates a layout template JSON using Amazon Textract.

Table of Contents

Getting started

You need Docker installed. The first run downloads the image and may take longer than later runs.

Usage

Mount a folder into the container and run a subcommand:

docker run --rm -v "$(pwd)":/data -w /data pdfix/autotag-textract:v1.0.8 <command> [options]

Commands

  • tag: Tag a PDF using Amazon Textract layout recognition
  • template: Create a layout template JSON for later tagging

Arguments

Common (used by tag and template)
OptionRequiredType / expected valueDescription
--aws_idyesString (AWS Access Key ID)AWS Access Key ID
--aws_secretyesString (AWS Secret Access Key)AWS Secret Access Key
--aws_regionyesString (AWS region code, e.g. us-east-1)AWS region
--namenoString (PDFix account license name)PDFix license name
--keynoString (PDFix account license key)PDFix license key
--zoomnoFloat, range 1.0–10.0 (default 2.0)Page render zoom
tag
OptionRequiredType / expected valueDescription
--input, -iyesPath to an existing .pdf fileInput PDF
--output, -oyesPath for the output .pdf fileOutput PDF
template
OptionRequiredType / expected valueDescription
--input, -iyesPath to an existing .pdf fileInput PDF
--output, -oyesPath ending in .jsonOutput JSON layout template

Examples

Tag a PDF:

docker run --rm -v "$(pwd)":/data -w /data pdfix/autotag-textract:v1.0.8 \
  tag --aws_id "${AWS_ID}" --aws_secret "${AWS_SECRET}" --aws_region "${AWS_REGION}" \
  --name "${LICENSE_NAME}" --key "${LICENSE_KEY}" \
  -i /data/input.pdf -o /data/output.pdf

Create a layout template JSON:

docker run --rm -v "$(pwd)":/data -w /data pdfix/autotag-textract:v1.0.8 \
  template --aws_id "${AWS_ID}" --aws_secret "${AWS_SECRET}" --aws_region "${AWS_REGION}" \
  -i /data/document.pdf -o /data/template.json

Help & support

For PDFix SDK licensing or issues, contact [email protected].

Licenses

Trial versions of the PDFix SDK may apply watermarks and redact random content in the output PDF.

Tag summary

Content type

Image

Digest

sha256:f55fdd6a9

Size

463.3 MB

Last updated

about 1 month ago

docker pull pdfix/autotag-textract