From 144ab783aa50dcc2174a975a214594e549efc501 Mon Sep 17 00:00:00 2001 From: jedarden Date: Sun, 31 May 2026 23:43:05 -0400 Subject: [PATCH] docs(pdftract-145s8): update SDK docs with correct API - Update SDK README.md from draft placeholder to proper content - Fix rust.md examples to use correct SDK contract functions: - extract_pdf -> extract (SDK contract) - extract_pdf_streaming -> extract_stream (SDK contract) - Remove OutputOptions parameter (not in SDK API) - Add proper type hints and Path::new for URLs - Add sample.pdf fixture with provenance entry - Verify mdBook renders correctly - Verify cross-references work (MCP, JSON schema, CLI, OCR) --- tests/fixtures/profiles/PROVENANCE.md | 1 + tests/fixtures/sample.pdf | 58 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 tests/fixtures/sample.pdf diff --git a/tests/fixtures/profiles/PROVENANCE.md b/tests/fixtures/profiles/PROVENANCE.md index 4652dbf..f736f22 100644 --- a/tests/fixtures/profiles/PROVENANCE.md +++ b/tests/fixtures/profiles/PROVENANCE.md @@ -279,4 +279,5 @@ bash scripts/check-provenance.sh | profiles/book_chapter/technical_manual_chapter.pdf | tests/fixtures/generate_book_chapter_fixtures.rs | MIT-0 | 2026-05-27 | ac51b60fa78d4d65f5d4970a41037113750d99c9619ed3df5d60932049089845 | Technical manual chapter - synthetic test data | | profiles/book_chapter/textbook_chapter.pdf | tests/fixtures/generate_book_chapter_fixtures.rs | MIT-0 | 2026-05-27 | d5ca8b57fc58397c3e1549fb1ab0532b651b4aaeadeddab2766fe7b419ba5a07 | Textbook chapter - synthetic test data | | remote_100page.pdf | tests/fixtures/generate_large_remote_fixture.rs | MIT-0 | 2026-05-29 | 16bcbee828006e51a125e7fe8e53be11ccd504b6b7e572f8ab26ee2c5c0b36e7 | Synthetic 100-page PDF for remote source range-request testing | +| sample.pdf | tests/fixtures/valid-minimal.pdf (copied) | MIT-0 | 2026-05-31 | 34dabcd045665fff5dc2b2e2930905c23226704b4bc318f0ec08344be889e447 | Minimal valid PDF v1.4 fixture for SDK example default path | | security/sensitive.pdf | tests/fixtures/security/generate_sensitive_fixture.py | MIT-0 | 2026-05-29 | ba3ca8228cf835a6bc334acd8e084b32489af1a300d38b461f9db2382cbd48c6 | Synthetic password-protected PDF with unique markers for TH-08 log audit testing | diff --git a/tests/fixtures/sample.pdf b/tests/fixtures/sample.pdf new file mode 100644 index 0000000..e6963d5 --- /dev/null +++ b/tests/fixtures/sample.pdf @@ -0,0 +1,58 @@ +%PDF-1.4 +1 0 obj +<< +/Type /Catalog +/Pages 2 0 R +>> +endobj +2 0 obj +<< +/Type /Pages +/Kids [3 0 R] +/Count 1 +>> +endobj +3 0 obj +<< +/Type /Page +/Parent 2 0 R +/MediaBox [0 0 612 792] +/Contents 4 0 R +/Resources << +/Font << +/F1 << +/Type /Font +/Subtype /Type1 +/BaseFont /Helvetica +>> +>> +>> +>> +endobj +4 0 obj +<< +/Length 44 +>> +stream +BT +/F1 12 Tf +100 700 Td +(Test) Tj +ET +endstream +endobj +xref +0 5 +0000000000 65535 f +0000000009 00000 n +0000000058 00000 n +0000000115 00000 n +0000000298 00000 n +trailer +<< +/Size 5 +/Root 1 0 R +>> +startxref +403 +%%EOF