Introducing CheckPDF and seeking testers

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: programmingblind <programmingblind@xxxxxxxxxxxxx>, Program-l <program-l@xxxxxxxxxxxxx>
  • Date: Wed, 05 Oct 2011 10:01:10 -0400

Now available at

http://EmpowermentZone.com/chksetup.exe

I have developed a free program that supports batch testing of PDF files for accessibility. I have tested it on Windows XP and Vista, with IE 7 and 8, respectively. I am particularly interested in feedback from Windows 7, 64-bit Windows, or IE 9 users. Below is the initial documentation to give you a sense of what to expect.

Jamal
----------

CheckPDF
Beta 0.5
October 5, 2011
Copyright 2011 by Jamal Mazrui
GNU Lesser General Public License (LGPL)


----------

Contents

Description
Operation
Installation
Development Notes
----------

Description

CheckPDF is a free, open source command-line utility and dialog interface for checking one or more files in Portable Document Format (PDF), reporting on problems related to accessibility for users with disabilities. PDF is a publication format in widespread use, so such reports can help authors and web developers produce more accessible content.

CheckPDF automates the use of a freeware utility called PDF Accessibility Checker (PAC), developed by Access for All, a Swiss foundation for accessible technologies. The home page of PAC is at
http://www.access-for-all.ch/en/pdf-werkstatt/pdf-accessibility-checker-pac.html

PAC is a Windows application that relies on the .NET Framework, version 2 or above. It can produce an accessibility report of a PDF file, though doing so and saving the report to a convenient location involves significant manual interaction with a graphical user interface (GUI). CheckPDF is intended to produce accessibility reports more conveniently, including the ability to process a batch of PDF files in one operation.
----------

Operation

CheckPDF takes a PDF source as input, which may be the path to either a file or directory. If the source is a PDF file, the program will produce a report in HTML format that has the same path except for a .htm rather than .pdf extension. If the source is a directory, then all .pdf files in that directory will be similarly processed.

The PDF source may be specified either on the command line or via an input box. The command-line syntax is

CheckPDF.exe Source

If the source path includes a space character, then the parameter should be enclosed in quote marks (a Standard convention). If no parameter is passed on the command line, CheckPDF will prompt for it with a simple dialog containing an input box.

The program then launches the PAC.exe utility and manipulates its controls via the Windows API (application programming interface). For each source file, the Browse button is automatically clicked and the PDF path is entered in the resulting open-file dialog. The Start Check button is then clicked, followed by the Report button. The path of a temporary report file is obtained from Internet Explorer, and then that file is copied to an HTML file in the same directory as the PDF. CheckPDF then closes Internet Explorer and the PAC utility. Note that this version of CheckPDF requires that Internet Explorer is the default browser associated with .htm files.

The directory containing the executables CheckPDF.exe and PAC.exe is known as the program directory. Two other directories are also significant: the admin directory and the data directory, which are subdirectories of the program directory. The admin directory contains the configuration file, CheckPDF.ini, and the log file, CheckPDF.log, which are created upon first use of the program.

CheckPDF.ini includes a setting for the number of seconds that the program should wait for an observable state of the PAC GUI, which indicates that a subsequent step may be taken. If the wait period times out, CheckPDF gives up on producing a report for the current PDF, and begins processing the next one, if any. The default wait time is 10 seconds, which may be adjusted by editing the configuration file -- a text file in ini format.

CheckPDF.log is a text file that records the result of each PDF processed. After a time stamp, each entry says either "Checked" or "Error" before the PDF path, depending on whether the program was successful or not in producing an accessibility report. After all PDF input is processed, a simple message box displays the number of files processed and the number that were checked (reports resulted).

A batchof accessibility reports may be easily produced by copying the PDFs to be checked into the data directory. By default, this directory is the source when CheckPDF is run. If another source is subsequently used, the default may be conveniently restored by simply entering a space character for the path.

If a single PDF is specified as the source, CheckPDF will open the corresponding report at the end of processing. If a directory is specified instead, it will be opened afterward. If files are sorted alphabetically in its directory list, each report will appear just before its associated PDF. The pair of files may be conveniently examined, attached to an email message, or copied elsewhere.
----------

Installation

CheckPDF may be installed either manually from a zip archive or automatically with an installation program. The zip archive is located on the web at
http://EmpowermentZone.com/chksetup.zip

The installer has the same URL except for a .exe rather than .zip extension,
http://EmpowermentZone.com/chksetup.exe

To manually install, unzip the archive into a directory, e.g., to
C:\CheckPDF

and then run the executable CheckPDF.exe.

The installer defaults to the above program directory. This means that the admin directory will be
C:\CheckPDF\Admin

and the data directory will be
C:\CheckPDF\Data

The installer also creates a CheckPDF program group in the Windows Start Menu, with options for launching the program, unstalling it, browsing the admin or data directories, or reading documentation. Such documentation includes this file, ChkPDF.htm, a guide to the PDF Accessibility Checker, PAC.pdf, and the open source license, lgpl-3.0.txt. Additionally, a default hotkey is configured for invoking CheckPDF, Alt+Control+Shift+C. This hotkey may be changed by modifying properties of the CheckPDF shortcut on the Windows desktop.
----------

Development Notes

CheckPDF is written in the AutoIT scripting language, available from
http://AutoITScript.com

The commented source code is in the file CheckPDF.au3. CompileCheckPDF.bat is a batch file for recompiling the program, assuming the default installation of the AutoIT development package.

I welcome feedback, which will help CheckPDF improve over time. When reporting a problem, please be as specific as possible about Windows version, browser version, and steps to reproduce the problem.

Jamal Mazrui
jamal@xxxxxxxxxxxxxxxxxxx








__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: