E002 Refinement: Empty Profile Handling
Context
The user identified an issue where an empty pdf_profile string (e.g., "") triggered the E002 "Invalid Profile" error. The expected behavior is that an empty profile implies Standard PDF generation (no specific PDF/A compliance), and thus should NOT trigger an error.
Changes
- Logic Update: In both
level_b.rsandparallel.rs, we now check ifpdf_profileis empty or whitespace-only before attempting to match it against known profiles. - Behavior:
pdf_profile: ""orNone-> Standard PDF (Success).pdf_profile: "pdfa-1b"-> PDF/A-1b (Success).pdf_profile: "invalid-profile"-> E002 Error (Failure).
Verification
- Server: Restarted on
http://127.0.0.1:6000. - Test: Sending a request with
pdf_profile: ""now generates a standard PDF successfully, whereas previously it returned an E002 overlay.