PDF Craft v2.6.6
PDF Craft 2.6.6 fixes concurrent PDF extraction, footnote OCR masks, XML fill
whitespace recovery, and chapter consistency after refinement. Downstream content
now comes from one finalized extraction result.
Migration from 2.6.5
- Extraction PAGE progress now uses stages 0–7 (
max_stage=7). Update numeric
labels: the previous OCR-persisted/JEV/LLM/final stages 2/3/4/5 become 4/5/6/7.
First OCR, second-pass image preparation and second OCR have separate entry
events. Async PDF pre-rendering remains in stage 0. See the
stage table.
#552,
#553. - Extraction
on_body/on_footnotecallbacks now deliver finalized, validated
content once, after optional refinement and chapter assembly. The first content
callback arrives later; useon_extraction_eventfor live progress. Callback
delivery is not a task-success signal. Metadata may still arrive earlier. - Derived TOC, chapter and furniture files are rebuilt from adopted content;
existingtoc.xmlis no longer trusted as input. Valid raw OCR caches remain
reusable. Re-extraction may assign different chapter IDs; existing PCEX files
retain their format and identities. See streaming and cache migration.
Fixes
-
Fix PCEX translation end-of-input races: title-dependent furniture waits for its
producer, and body/footnote callbacks drain the final content exactly once in
channel order. Failed or cancelled input scans are not successful EOF. Queue
emptiness is checked after observing successful production completion. -
Serialize live page consumption across concurrent preparation/completion events,
fixing duplicate pages andKeyError. Isolate blocking analysis and rendering
workers from the short-IO pool, coordinate cancellation and callback draining,
and settle concurrent work-unit completion only once.
#560. -
Finalize traditional/refined content before deriving chapter IDs, TOC and
furniture. Removing or merging a heading no longer leaves stale directory
anchors; furniture uses final ownership. Formal content callbacks match adopted
chapters. Private disk chunks bound intermediate aggregation without restoring
pre-refinement directory constraints.
#561. -
Preserve the complete union of first-pass OCR redaction masks. A lower, narrower
text box no longer leaves the right side of a wider box exposed to the second
footnote pass, preventing duplicate recognition from that leak.
#554. -
Share document-whitespace semantics across friendly XML, segmentation and fill
recovery. Preserve inline word boundaries and special spaces; reconstruct
unambiguous canonical whitespace instead of spending another LLM request.
Protected contexts retain their semantics; ambiguous allocation and changed
words or punctuation still require correction. See LLM acceptance.
#556,
#558. -
Allocate merged canonical formulas through immutable math references, retain
required empty source slots, and keep boundary spaces outside formula content
that will be replaced. Accepted separators survive source-formula restoration.
#557,
#559. -
Preserve mixed-content text when serializing ordinary and streamed PCEX chapters;
XML indentation no longer inserts separators between adjacent formulas.
#555.
PCEX v4 and the progress event object structure are unchanged. The PAGE stage
numbers and extraction content-callback timing changes above require attention.
Full Changelog: v2.6.5...v2.6.6