tclpdf

Provenance of tclpdf
Login

Provenance of tclpdf

1. What this document is

This document states how tclpdf was made, which rules applied to its code, what was checked about the origin of that code and which third-party material the package contains. It covers the Fossil repository at https://fossil.sowaswie.de/tclpdf up to the tag version-1.7 (check-in 9ba4e3def9, 2026-10-16) and the licence check-in f144958ae7 of 2026-10-29. Every statement names something a reader of the repository or its archives can check: a file in the tree, a check-in, a tag, a published technote, a wiki page or an external source. Where only the author can vouch for a statement, it says so.

2. How the package was made

Tool. tclpdf was written with Claude Code, from 2026-08-08 to the date of this document, 2026-10-29. The technote Claude Code usage on tclpdf (eb40b29870) covers 2026-08-08 to 2026-08-28 and names the models and their roles: Claude Opus 5 for the main session and every build package, Claude Fable 5 for the main session from round 7 on and for the reviewers of rounds 7 and 8, Claude Opus 4.8 in the first days, Claude Sonnet 5 for a single measurement. No comparable account is published for the time after 2026-08-28.

The author's part. Alexander Schöpe specified the package, set the coding rules, had every build reviewed and accepted or rejected the result; the author states that every check-in was made by him or on his explicit instruction. The measurable traces: up to version-1.7 the timeline holds 127 check-ins, all under the one Fossil user alex (fossil timeline ancestors version-1.7 -n 0 -t ci); 17 of them fix review findings, for example e8a2a51faf (round 1), c55d5aab3f (round 4), 87727ccab0 (round 7) and 438392197a (round 8). The eight standards-conformance review rounds, with the number of reviewers and findings per round, are published as the technote What eight review rounds found that no validator reports (b109efe243). The release tags version-1.0 to version-1.7 mark what the author released.

3. The rules given

No code from other projects. This is stated by the author. In writing it appears in the published prompt chronicle of 2026-08-29 (technote 954d9f4f79), as part of the commission of 2026-08-08: "no code is copied, nothing is transcribed! only analysed! everything we make comes out of the ISO, the RFCs and the tech docs." The chronicle is the author's edited account, not the raw transcript (see section 6). According to the author, the coding rules in force during the build allowed only the mechanism to be taken from a reference implementation - which PDF objects, in which order - and not the shape of its code. Those rule files are working files and not part of the repository.

A test and an example for every feature. make check (tools/check.sh) runs the test suite under every installed Tcl interpreter, runs every example under examples/ and passes each resulting document through qpdf, pdfinfo and veraPDF (against the profile the document claims) and, where they apply, through Mustangproject, pdfsig and PDFBox; a missing tool counts as skipped, not as passed. At version-1.7 there are 88 example scripts and 91 test files with 4672 tests (technote tclpdf 1.7 - what it does, and what it deliberately does not, efeebd4a0b). Check-in d22b289e38 (2026-08-17) added tests and examples for every manual option that had none.

Every error carries an error code. tests/errorcode.test fails if any error raised anywhere in the tree lacks -errorcode, and the last station of make check compares the error-code table in the manual with the one generated from the source; the list is published as the wiki page error-codes.

4. What was checked (2026-10-29)

On 2026-10-29 the author had the tree at version-1.7 checked for foreign code, with Claude Code agents doing the measuring: ScanCode Toolkit 32.5.0 (SPDX list 3.27) over a checkout of version-1.7 together with the author's unversioned working files beside it, 6810 files in all, of which 516 are the versioned tree; a manual review of the risk areas (font parsing, subsetting and shaping, PNG, JPEG and TIFF decoding, encryption, signing, XMP and PDF/A, generated lookup tables, build files); and a line-level comparison of the 107 modules and the tools against pdf4tcl (including the fork 0.9.4.49, 214 files), tcllib, jsPDF with jsPDF-AutoTable, and libhyphen 2.8.8. The reports of that check are working files of the author and not published; what the repository shows is the check-in that acted on the findings, f144958ae7. Result: no foreign code was found in the package. Matches were constants and names fixed by the standards or common Tcl idioms. The one item taken over was a single dictionary value: the first version of the encryption module (01724f5e6a, 2026-08-20) wrote /Length 256 into the encryption dictionary as the pdf4tcl fork does; round 5 removed it as contrary to ISO 32000-2 Table 20 (7c8f62ca73, 2026-08-22), and encrypt.tcl still notes where it came from. Besides the TEA build files and tests/all.tcl, which come from Tcl (section 5), one file outside the package is derived from foreign code and says so: tools/mkversion.tcl, a build tool that writes manifest.txt, is the author's port of Fossil's mkversion.c (BSD-2-Clause), dated 2024-2025 in its header, older than tclpdf. It carries Fossil's notice since f144958ae7; the source archives of 1.0 to 1.7 hold the file with its one-line attribution but without that notice. It is neither installed nor part of the binary archives. A snippet scan with SCANOSS is pending.

5. Third-party material

No font is part of the installed package; the faces under examples/assets/fonts serve tests and examples and travel only in the source archive, each with its licence, and examples/assets/README.md records origin, terms and embedding flag of every face and sample file. What is installed besides the MIT-licensed modules (license.terms) carries its terms in the files themselves: the ICC profiles in icc/ (see icc/README.md), the widths derived from Adobe's core font metrics in afmData.tcl, and the Unicode tables in bidiData.tcl and joiningData.tcl (Unicode License v3, also tools/ucd/LICENSE). In the source archive, and not installed, the TEA build files under tclconfig/, the test harness tests/all.tcl and the Tcl 9 logo among the example assets (examples/assets/images/Tcl9logo.svg, the SVG published at https://cmacleod.me.uk/tcl/logo/ unchanged, released on the Tcl wiki page "A logo for Tcl 9" under "same license as Tcl") are under the Tcl licence (tclconfig/license.terms), and tools/mkversion.tcl under BSD-2-Clause (section 4). The overview is the LICENCE section of README; the standards the code follows are listed on the wiki page sources.

6. What the history does and does not show

The history shows when each change entered, what its comment says and which release it belongs to. It does not show who typed a line: all check-ins run under one user, so code the author wrote himself and code he had generated and accepted cannot be told apart. The functional code of 1.0 entered in one check-in (e1795e6562, 2026-08-10, stages 1 to 6); how it arose before that is not recorded. The prompts and session transcripts are not in the repository. The published prompt chronicle (954d9f4f79, English; efe770a5be, German) ends on 2026-08-29 and is the author's edited account of the instructions, not the raw transcript; the author states that he revised the German text, including the opening commission, before it was translated and published.