Skip to content

Commit 5197b8a

Browse files
committed
readme update
1 parent 6486ae3 commit 5197b8a

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

README.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,69 @@
1-
# Validate PDF Accessibility with PDFix
1+
# PDF Accessibility Validator using PDFix
2+
A Java CLI tool for validating accessibility issues in PDF documents
23

3-
A Java CLI application to validate and report accessibility issues in PDF documents. We use free version of PDFix SDK for PDF reading operations.
4+
## Introduction
5+
This tool validates PDF accessibility by checking for issues in tagged PDF documents. It leverages the PDFix SDK (free version) for reading and processing PDF files. Ensuring that PDFs are accessible is crucial for users with disabilities, and this tool helps identify and report potential issues.
46

57
## Table of Contents
6-
- [Validate PDF Accessibility with PDFix](#validate-pdf-accessibility-with-pdfix)
8+
- [PDF Accessibility Validator using PDFix](#pdf-accessibility-validator-using-pdfix)
9+
- [Introduction](#introduction)
710
- [Table of Contents](#table-of-contents)
8-
- [Command-Line options](#command-line-options)
11+
- [Command-Line Options](#command-line-options)
912
- [Run the CLI Commands](#run-the-cli-commands)
1013
- [Report Duplicate MCID in Tagged PDF](#report-duplicate-mcid-in-tagged-pdf)
14+
- [Installation](#installation)
1115
- [Build Instructions](#build-instructions)
1216
- [1. Download and Install PDFix SDK for Java](#1-download-and-install-pdfix-sdk-for-java)
1317
- [2. Compile, Test and Package](#2-compile-test-and-package)
1418
- [Have a question? Need help?](#have-a-question-need-help)
1519

1620

17-
## Command-Line options
18-
```
21+
## Command-Line Options
22+
```yml
1923
Usage:
20-
java -jar validate-pdf-1.0.0.jar [operation] [arguments]
24+
java -jar validate-pdf-{version}.jar [operation] [arguments]
2125

2226
Operations:
23-
duplicate-mcid : Validate and report duplicate MCID entries in a tagged content
27+
duplicate-mcid : Check for and report duplicate MCID (Marked Content Identifier) entries in a tagged PDF.
2428

2529
Arguments:
26-
-i <file> : Path to a PDF file to process
27-
-d <folder> : Path to a directory to process
30+
-i <file> : Path to a single PDF file to validate.
31+
-d <folder> : Path to a directory of PDF files to validate (will process all PDFs in the folder).
2832
```
2933
3034
## Run the CLI Commands
3135
3236
### Report Duplicate MCID in Tagged PDF
37+
This command validates a PDF file for duplicate MCID entries, which can cause accessibility issues for screen readers.
38+
3339
```bash
34-
java -jar target/net.pdfix.validate-pdf-1.0.0 duplicate-mcid -i "<path to pdf>"
40+
java -jar target/net.pdfix.validate-pdf-{version}.jar duplicate-mcid -i "path/to/your/file.pdf"
3541
```
42+
3643
**Output**
37-
```
44+
```yaml
3845
===============================================================================
39-
File: /Users/administrator/Downloads/example.pdf
46+
File: path/to/your/file.pdf
4047
Duplicate MCID Found:
4148
MCID : 9
4249
Page : 26
4350
Index : 32
4451
Type : text
4552
BBox : [240.12, 455.95, 297.72, 457.32]
46-
Content: Freitag
53+
Content : Friday
4754

48-
Total 1 duplicate MCIDs found
55+
Total 1 duplicate MCID(s) found
4956
===============================================================================
5057
```
5158

59+
## Installation
60+
You can download the pre-built `jar` from the [Releases page](https://github.com/pdfix/action-validate-pdf-pdfix-java/releases) if you prefer not to build the tool yourself.
61+
5262
## Build Instructions
5363

5464
### 1. Download and Install PDFix SDK for Java
65+
Before building the project, you need to download and install the PDFix SDK. This SDK is used to read and process PDF files for accessibility validation. Run the following commands:
66+
5567
```bash
5668
mkdir -p lib
5769
curl -L https://github.com/pdfix/pdfix_sdk_builds/releases/download/v8.4.3/java8-net.pdfix.pdfixlib-8.4.3.jar.zip -o lib/pdfixlib-8.4.3.jar.zip
@@ -66,7 +78,5 @@ mvn test
6678
mvn package
6779
```
6880

69-
70-
7181
## Have a question? Need help?
72-
Let us know and we’ll get back to you. Write us to [email protected].
82+
If you have any questions or need assistance, feel free to reach out to us via email at [[email protected]](mailto:[email protected]).

src/main/java/net/pdfix/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private static void processFile(File file) throws Exception {
7878
if (count == 0) {
7979
System.out.println("No duplicate MCIDs found");
8080
} else {
81-
System.out.println(String.format("Total %d duplicate MCIDs found", count));
81+
System.out.println(String.format("Total %d duplicate MCID(s) found", count));
8282
}
8383
}
8484

0 commit comments

Comments
 (0)