Skip to content

[MWPW-204909] Onboard avalon verbs - #875

Open
Ruchika4 wants to merge 14 commits into
stagefrom
avalon
Open

[MWPW-204909] Onboard avalon verbs#875
Ruchika4 wants to merge 14 commits into
stagefrom
avalon

Conversation

@Ruchika4

@Ruchika4 Ruchika4 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

MWPW-204909 - Add gen-presentation-v2 / interactive-report / stylize verbs and PDF integrity validation

Summary

Adds support for three new Acrobat verbs and introduces config-driven PDF pre-upload validation — encryption / password-protection, corrupted-file, AcroForm, and scanned-document detection — alongside a generalized word page-count check.

Updating pdf-lite library code with latest version 1.14.0

Changes

New verbs

  • Registered gen-presentation-v2, interactive-report, and stylize across the enabled-features list (workflow.js), LIMITS_MAP (action-binder.js), and the verb config arrays in target-config.json.
  • Added a page-limit-15 limit (used by stylize) in limits.json.

Config-driven PDF validation (action-binder.js, pdflite-validator.js)

  • pdflite-validator.js now surfaces isEncrypted, isPasswordProtected, hasAcroForm, and isScanned from pdflite file details, and flags files as corrupted when fileDetails throws.
  • filterFilesWithPdflite runs integrity, AcroForm, scanned, and page-count checks selectively per verb, driven by new config lists: pdfIntegrityCheckVerbs, pdfAcroformCheckVerbs, pdfScannedCheckVerbs, and wordPageCountVerbs (the word page-count check is now config-driven instead of hardcoded to resume-builder).
  • The per-check logic is unified behind a single helper to remove duplication across the integrity/AcroForm/scanned checks.
  • Encrypted / password-protected / corrupted, form-containing, and scanned PDFs are filtered out with error toasts.

Scanned-document detection

  • pdflite's scan (IS_SCANNED_DOCUMENT) is only computed when fileDetails is called with checkScanned = true, so checkScanned is threaded through validateFilesWithPdflite and enabled only for verbs in pdfScannedCheckVerbs (currently stylize) to avoid the extra OCR cost on other flows.

Corrupted-file handling

  • An exception thrown from pdflite's fileDetails signifies a corrupted/unreadable PDF; these are now caught and rejected via the existing integrity check (no new error code).

New error codes / messages

  • Added validation_error_password_protected(_multi), validation_error_acroform_not_supported(_multi), and validation_error_scanned_document(_multi) to the error map and message maps.

Testing

  • Added unit tests for pdflite-validator covering the new encryption / password-protection / AcroForm fields — passing.
  • Verified the existing Acrobat action-binder unit suite runs against the updated code (headless CI).
  • Suggested QA:
    • Upload flows for gen-presentation-v2, interactive-report, and stylize (page limits, allowed file types).
    • Upload an encrypted / password-protected PDF, a PDF containing a form, and a corrupted PDF to a verb in pdfIntegrityCheckVerbs / pdfAcroformCheckVerbs and confirm the correct error toast appears and the file is excluded.
    • Upload a scanned PDF to stylize and confirm the scanned-document error toast fires.
    • Confirm word page-count validation still fires for resume-builder and the newly configured verbs.

Unity integration is not implemented on stage on Unity BE and product side yet, so the end-to-end flow will not work for now. Please test all the client-side validation till then.

Test URLs

@aem-code-sync

aem-code-sync Bot commented Aug 21, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@Ruchika4 Ruchika4 changed the title [MWPW-204909] Avalon [MWPW-204909] Onboard avalon verbs Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant