Skip to content

Add PDF Preview to Form PDF Settings#1663

Draft
jakejackson1 wants to merge 1 commit into
developmentfrom
pdf-preview
Draft

Add PDF Preview to Form PDF Settings#1663
jakejackson1 wants to merge 1 commit into
developmentfrom
pdf-preview

Conversation

@jakejackson1

Copy link
Copy Markdown
Member

Status: 🚧 Draft — parked until ready for prime-time

This PR re-introduces the Preview PDF feature that was removed from development (in c91fa7ab) because it isn't ready yet. It's parked here as a single, mergeable commit so the work isn't lost and can be resumed.

What it adds

  • A Preview PDF button on the Form PDF Settings page that renders a live PDF from the current (unsaved) settings.
  • A dedicated REST endpoint gravity-pdf/v1 form/<id>/preview (Rest_Pdf_Preview) that builds + streams the preview.
  • Supporting preview-only React utilities (api/preview.js, PdfSettings/previewButton.js, PdfSettings/formSettings.js, utilities/download.js) and the gfpdf_preview_settings JS filter.
  • PHPUnit coverage (Test_Rest_Pdf_Preview).

Before this can ship

  • Decide whether the live-preview-from-unsaved-settings flow is the approach we want.
  • Harden the endpoint + JS, add E2E coverage.
  • Rebase onto latest development.

🤖 Generated with Claude Code

Adds a "Preview PDF" button to the Form PDF Settings page that renders a
live PDF from the current (unsaved) settings via a dedicated
gravity-pdf/v1 form/<id>/preview REST endpoint.

Parked as a draft until it's ready for prime-time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant