Files
Bundo Lee 58c8df963c chore: update all dependencies to latest and fix security alerts
Objective: 10 open Dependabot alerts (3 high, 4 medium, 2 low) and 1 open
code scanning alert (information exposure through exception) accumulate
security risk and block compliance checks.

Approach: Update all packages across Node, Python, and Java to their
latest stable versions. Fix the code scanning alert by replacing raw
exception messages with a generic error string in the HTTP response —
stack traces are still logged server-side for debugging.

Evidence: Full build and test suites pass across all three ecosystems.

Node: pnpm build + vitest — 18/18 tests pass with TypeScript 6.0.2.
  tsconfig.json updated with "types": ["node"] and
  "ignoreDeprecations": "6.0" for TS6 compatibility.

Python: pytest — 40/40 tests pass. uv.lock updated for both packages.
  hybrid tests skip as expected (optional deps not installed locally).

Java: mvn clean verify — 502/502 tests pass (448 core + 54 cli).
  maven-compiler-plugin 3.14.1→3.15.0, spotbugs 4.9.8.2→4.9.8.3.

Security alerts addressed:
- Code scanning #30: hybrid_server.py no longer leaks str(e) to client
- Dependabot #25-27 (vite): updated to ^8.0.8
- Dependabot #30 (pillow), #31 (pytest), #29 (cryptography),
  #28 (transformers), #24/#23 (Pygments): lock files pull patched versions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 20:03:45 +09:00
..

Batch Processing Example

Demonstrates processing multiple PDFs in a single invocation to avoid repeated Java JVM startup overhead.

Prerequisites

  • Python 3.10+
  • Java 11+ (on PATH)

Example

batch_processing.py shows two methods for batch conversion:

  1. File list — Pass multiple PDF paths as a list
  2. Directory — Pass a directory path (recursively finds all PDFs)

Both methods use a single JVM invocation, which is significantly faster than calling the CLI once per file.

Run:

pip install -r requirements.txt
python batch_processing.py

Sample Output

Found 4 PDFs in pdf/

==========================================================
Method 1: Batch convert with file list
==========================================================

Document                                  Pages Top-level
----------------------------------------------------------
1901.03003                                   15       241
2408.02509v1                                 14       365
chinese_scan                                  1         1
lorem                                         1         2
----------------------------------------------------------
Total                                        31       609

Processed 4 documents
Time: 7.95s (single JVM invocation)