Skip to content

Show a form field at the same place on more pages, as one engine op - #1190

Merged
bobsingor merged 11 commits into
mainfrom
feature/form-repeat
Dec 1, 2026
Merged

bobsingor merged 11 commits into
mainfrom
feature/form-repeat

Conversation

@bobsingor

@bobsingor bobsingor commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Signing flows step 9: initials at the foot of every page, a reference number in every header. Place the field once, then repeat it.

await form.repeat(initials.ref, { pages: 'all' });   // the form plugin
await doc.forms.repeat(initials.ref, { pages: 'all' }); // the engine

form.repeat(ref, { pages, as }) shows a field at the same place on more pages, as one change and one step to undo, and form.canRepeat(ref) says whether a field can be repeated. The form designer's sidebar has a section for it, On more pages, in the second commit.

It is one new engine op, forms.repeat. A first version built it from ops that exist, one forms.addWidget per box and one forms.copy per page. Each op read, captured and answered the whole field, so the cost grew with the square of the pages: 500 boxes took the cloud 15 s to add and 109 s to undo, the local engine refused the undo, and the cloud's 512 ops per change capped it near 260 pages. One action is now one op, as forms.copy, annotations.copy and pages.rotate are.

#1191, merged into this branch, adds checkbox and radio groups whose values a list in the field names (/Opt), on the runtime release 42f70f654 (embedpdf/runtime#139) that it pins.

What a page gets

What it holds decides, unless as says otherwise:

  • A value is one answer ('boxes'). A text field, a checkbox, a radio group, a dropdown, a list or a plain push button gets one more widget of the same field on each page, with the look, the flags and the actions of the one it repeats. Fill one in, and every page shows it. A page the field already shows on is left as it is. A radio group gets radiosInUnison in the same op, so the buttons of one value go on and off together. A copy keeps its source's on-state name, and in a group whose values /Opt names each copy gets its entry there.
  • A mark is made on each page ('fields'). An image field, such as initials, becomes a new field on each page but its own, as duplicate() makes one: named initials_2 and on, with its settings and scripts, and no value or picture.
  • A signature field isn't repeated. A signer signs once: invalid-input in the plugin, InvalidArg in the engine.

What is repeated is every widget the field has on the page of its first one. The place is measured from the top-left corner of the page as it is shown: on a page shown turned another way a copy stands where the reader sees the original and reads the same way, and on a smaller page a copy that would stand past the edge is moved in.

How the engine does it

  • One rule, in engine-core: planFormRepeats (transfer/formRepeat.ts), pure, as planFormCopies is. The engine applies it, the plugin checks with it before it sends anything, and every SDK gets the same result.
  • One pass, in engine-services: FormRepeater reads the fields and the repeated field's own widget rows once, writes every copy (FormMutator.addWidgets(), or the planned fields), and reads back once.
  • One step to undo, and one to redo. As boxes (widgets.added) the new widgets leave the field's own list and their pages through each page's annotation list, and only the field's dictionary is captured. As fields (fields.repeat) the new fields are deleted together.
  • Events. As boxes one forms.widgetAdded for the field, with every new widget's row; as fields one forms.created per field. An undo is one item with undone: true, and fires one forms.widgetRemoved or a forms.deleted per field. These are event kinds every listener already folds.
  • Limits. At most BundleLimits.pages pages (2,000) and items widgets and fields (10,000), refused with PayloadTooLarge before any write. The cloud's 512 ops per change no longer plays a part.

What an app upgrading from 3.4 notices

  • New, nothing removed: form.repeat(), form.canRepeat(), FormRepeatOptions, FormRepeatResult, and both in Angular's EpdfForm; doc.forms.repeat(), the op forms.repeat and its item; planFormRepeats and its helpers and types in engine-core, planFormRepeat in validation; runFormRepeatConformance and REPEAT_PAGES_PDF in conformance; ChangeOp.FormsRepeat and ChangeItem.FormsRepeat in @cloudpdf/sdk.
  • hasValuesList on CheckboxField and RadioField (Repeat and add buttons in a group whose values /Opt names #1191): whether a list in the field (/Opt) names the group's values. It is a required wire member; withValuesList() gives an older server's group false. addedToggleStates() picks a new button's on-state name.
  • The runtime is pinned to 42f70f654. EPDFForm_AttachWidget takes the new widget's value, and EPDFForm_HasFieldValuesList is new; the bindings are regenerated.
  • The viewer: with forms.building on, the Form design sidebar shows On more pages under a selected field that can be repeated, in a document of more than one page. Seven locale keys, formDesign.repeat*, in all fifteen languages.
  • A widget added to a checked checkbox now shows checked, and so does a button added to a radio group in unison whose value is on. addWidget() made every new checkbox or radio widget off, whatever the field held.
  • A button added to a listed group gets its value. addWidget() on main gave it no /Opt entry, so it read back Yes.
  • A copy of many fields is faster. Planned field creates (duplicate(), a design import) read the fields back once at the end, not after each one: 400 fields took 1.1 s on the local engine, now 0.17 s.
  • The form mirror drops a widget whose add was undone. After undoing an addWidget(), getWidget() answered the gone widget's row until the next refresh.
  • Against an older server. forms.repeat arrived in 3.5: the cloud engine refuses it alone, before sending, with unsupported, and a 3.5 server sends an older client full-refresh in place of a change with it. There is no fallback to many ops.

After the review

Five findings, four of them reproduced; three were already on main through addWidget(), create() and a delete's undo, and are mended here too (commit e4d5a4aba):

  • A split field's undo on a page that keeps its annotations in a list of their own (/Annots 7 0 R) left the split widget on the page while the field named its old one. A capture of the page dictionary doesn't reach such a list. The undo of any widget add is now one step, widgets.added, for addWidget() and a repeat alike: each new widget leaves its page through the page's list, the field's own entry goes back in its place, and the redo splits it there again. A single addWidget() on such a page left its widget behind the same way, and its redo answered forms.removeWidget; both are mended.
  • A radio group whose values a list in the field names (/Opt): a new button read back Yes and never went on with its value. Repeat and add buttons in a group whose values /Opt names #1191 mends it: the runtime's attach writes the new button's /Opt entry, hasValuesList reads whether a group has the list, and addWidget() and a repeat as boxes give each new button its value. The undo takes the entry out and the redo puts it back. canRepeat() is true for such a group.
  • An undo deleted a widget someone moved since. Every add, create, copy, import and repeat now keeps each widget it made as the guard: an add or a repeat as boxes is left alone when one changed, and a field whose widget changed stays.
  • A redo brought back customer_2 beside customer_2.address. It, and a deleted field's undo, now leave out a name another field sits under or above.
  • The limits were counted after planning every widget. planFormRepeats takes them and refuses before it plans.

The stale SDK snippet manifest is rebuilt with pnpm api:sync (b9fb47fdd).

A second review found five more, all mended (8b026a093, and #1191 for the last):

  • A field whose /Kids is an object of its own kept references to the deleted widgets in the saved file after an undo. The undo now takes each new widget out of the field's own list (EPDFForm_DetachWidget), wherever the file keeps it; the redo lets each join again in its order and puts it back exactly. A conformance case reads the saved file's list.
  • The undo of a split took back a reorder made since. The field now goes where its split widget stands, and the redo the other way round.
  • The viewer planned every new widget before the engine could refuse past its limits. formRepeatScopeOf counts what a repeat would reach without planning it, and the plugin uses it.
  • The read-back of new toggles scanned the field once per new widget. It runs for toggles only, over an index made once.
  • A group whose /Opt entries match its state names (/Opt [(0) (1)]) read as unlisted. hasValuesList reads the list itself, so the group repeats with its values.

A third review found two more (277e6b254, and #1191 for the second):

  • An undo missed a later change to a /Kids kept as its own object. Undoing a repeat after the field's first widget was deleted was refused with NotFound, where an inline list was left alone. The step now keeps the field's widgets by object number and is left alone when the field lists others.
  • A checkbox or one-button group with /Opt [(Yes)] got a widget with no /Opt entry (two widgets, one entry). Each new widget now gets its entry, by a repeat and by addWidget().

On main, removeWidget() and deleteWidget() on a field whose /Kids is its own object have a flaw of the same kind: their undo is refused with NotFound and the field is left without the widget. This pull request doesn't touch them; their fix comes in a pull request of its own once this one is in.

Measured

Before and after on the cloud engine, through the plugin, against an in-process server on the native runtime. One write request per action at every size, and no reads after it.

Pages As boxes: add, answer; undo, answer Before
200 73 ms, 384 KB; 40 ms, 134 KB 3.6 s, 8.7 MB; 11 s, 37.6 MB
500 144 ms, 963 KB; 71 ms, 336 KB 14.6 s; 109 s
2,000 459 ms, 3.9 MB; 203 ms, 1.4 MB over 512 ops

As fields, 500 pages take 0.29 s to add and 0.16 s to undo, where they took 30.6 s and 12.9 s. On the local engine alone, 2,000 pages take 0.27 s as boxes (undo 0.09 s) and 2.9 s as fields (undo 3.7 s). A listed group costs more as boxes, since each attach walks the field's /Kids to place the entry: 2.4 s where an unlisted one takes 0.6 s at 2,000 pages (wasm).

One cost is left, in the viewer: 2,000 pages as fields resolve after 5.6 s on the cloud, though the request takes 1.3 s. The form plugin's mirror rebuilds its whole index for each forms.created event, so a change that makes thousands of fields costs it the square. A large duplicate() or design import has the same cost. At 500 pages it is about 0.1 s. It is its own change.

Acrobat

The file this branch saves for the check document reads the same as the one checked in Acrobat 26 for the first version, by the engine's own read: every field, setting, widget, place, turn, flag and look. Three moved image-field copies no longer carry a modifiedAt, because they are made at their place instead of made and then moved. In that Acrobat check our file filled as one value on all six pages, upright on the turned page, and a radio button clicked on one page was on on the others. Acrobat's own Duplicate Across Pages makes one field for an image field, makes one radio button a group of its own per page, and leaves a copy unturned on a turned page and hanging off a smaller one.

For #1191, a listed radio group and a checkbox repeated over three pages and saved, opened in Acrobat 26.002: every page shows the saved choice, a click on a new button switches every page, and Acrobat reads value and exportValues from the list.

Tests

  • New, runFormRepeatConformance (17) on the local engine (wasm) and the cloud engine (server, native): a value and an image field on every page, as either way, what the first page shows on a smaller page, a checkbox and a radio group, one undo on pages whose /Annots is its own object or in the page, refusals that write nothing; after the review, a split field on a page with its own list (through the repeat and through addWidget()), a /Kids kept as its own object, an undo after a widget moved (boxes, fields, a create), and a redo after the name became a parent; from Repeat and add buttons in a group whose values /Opt names #1191, listed groups: a repeat with its values in unison, undo and redo read from the saved file's /Opt, /Opt [(0) (1)], and /Opt [(Yes)] by repeat and by addWidget(). Each checks the answer, the events, the undo and the redo.
  • New, packages/engine/core/test/transfer/formRepeat.test.ts (20, the limits among them): the place on turned, smaller and larger pages, what a page gets, names, scripts, refusals. New, addedToggleStates.test.ts (4).
  • runChangeConformance: a round trip for forms.repeat.
  • New, packages/plugin/form/test/repeat.integration.test.ts (15) on the real engine, and packages/viewer/main/test/form-repeat.test.ts (5) in Chromium on the built snippet.

Checked

  • On 8b026a093 (main merged in at c312161d7): typecheck 125 of 125; engine-core 1307, engine 2381 (9 skipped), cloud engine 1502 (4 skipped), server 1252 (17 skipped), contract 275, plugin-form 513 (3 skipped), Angular 224, the viewer in Chromium 612 of 612; api:check, api:sync, check:comments, check:plugin-boundaries, check:architecture, check:network-literals, readme:check, docs:check for both sites.
  • On 277e6b254: the change and repeat tests on the local engine, and the repeat conformance on the cloud engine.
  • Repeat and add buttons in a group whose values /Opt names #1191 on the released runtime 42f70f654 (macOS native and wasm): typecheck 125 of 125; engine 2,385 (9 skipped), cloud engine 1,506 (4 skipped), engine-core 1,312, plugin-form 513, contract 275; repeat conformance 17 of 17 on both engines; api:check, docs:check on both sites, check:*, readme:check.
  • CI on the merged head (16dda6528): running when this was written. Nothing had failed but the four Vercel example sites (snippet, React MUI, Svelte Tailwind, Vue Vuetify), which fail on main too.

Not run: React, Vue and Svelte suites, WebKit and Firefox, Linux, and Acrobat on this branch's check document after #1191.

`form.repeat(ref, { pages, as })` shows a field on more pages, as one
change and one step to undo, and `form.canRepeat(ref)` says whether a
field can be repeated. What a page gets follows from what the field
holds, unless `as` says: a field with a value gets one more widget on
each page, all of the same field; an image field becomes a new field on
each page, named as a copy is. A signature field is refused.

It is the engine's new verb `doc.forms.repeat()`, the change op
`forms.repeat { field, pages: 'all' | PageRef[], as?, objectNumbers? }`:
one op whatever the number of pages. Built from the ops that exist, one
`forms.addWidget` per box and one `forms.copy` per page, each op read,
captured and answered the whole field, so the cost grew with the square
of the pages: 500 boxes took the cloud 15 s to add and 109 s to undo,
and the local engine refused the undo.

- The rule is one pure function in engine-core, `planFormRepeats`: what
  is repeated (every widget on the page of the field's first one), which
  pages get something, and where a copy stands, measured from the
  top-left corner of the page as it is shown, so on a page shown turned
  a copy stands where the reader sees the original and reads the same
  way, and on a smaller page it is moved in.
- engine-services reads the fields and the repeated field's own rows
  once, writes every copy (`FormMutator.addWidgets()`, or the planned
  fields), and reads back once. Its undo and redo are one step each:
  `widgets.repeat` takes the new widgets off their pages through each
  page's annotation list, so it holds where `/Annots` is an object of its
  own, and captures only the field's dictionary; `fields.repeat` deletes
  the new fields together (`FormMutator.deleteFields()`).
- Events: as boxes one `forms.widgetAdded` for the field with every new
  row, as fields one `forms.created` per field; an undo is one item with
  `undone: true` and fires `forms.widgetRemoved` or `forms.deleted`.
- Limits: at most `BundleLimits.pages` pages and `items` new widgets and
  fields, refused with `PayloadTooLarge` before any write. The op arrived
  in 3.5 (`CHANGE_KIND_SINCE`): the cloud engine refuses it against an
  older server, and the server sends an older client `full-refresh`.
- The server estimates the object numbers the op needs; the contract and
  the TypeScript SDK have the op and its item.
- The plugin checks with `planFormRepeats` and stages the one op. It
  predicts nothing: the copies show when the engine answers. Its mirror
  now drops the row of a widget whose add was undone.

Two changes beyond repeat: a widget added to a checked checkbox, or to a
radio group in unison whose value is on, shows checked, where it always
started off; and planned field creates (a copy, a design import) read
the fields back once at the end instead of after each one, which takes
a copy of 400 fields from 1.1 s to 0.17 s.

Measured: 500 pages as boxes take the cloud 0.14 s to add and 0.07 s to
undo, and 200 pages answer 384 KB where they answered 8.7 MB. On the
local engine 2,000 pages take 0.27 s as boxes and 2.9 s as fields.

Test: `runFormRepeatConformance` on both engines (7, the verb, a turned
and a smaller page, a page whose `/Annots` is its own object, undo and
redo, refusals that write nothing), a round trip for the op in the
change conformance, the planner's unit tests (17), and the plugin's
repeat tests (15).
Under a selected field's settings the Form design sidebar has On more
pages: From page and To page, which start at the whole document, and
Repeat on these pages, which calls `form.repeat()`. A field with a value
gets one more box on each page, an image field such as initials a field
of its own on each, and all of it is one step to undo. A line under the
button says which pages the field is on now, or that it couldn't be
done, and names a range past the engine's page limit. The section
doesn't show for a signature field, in a document of one page, or
without the right to design the form.

Its seven labels are in all fifteen languages.

Test: in Chromium on the built snippet, the range from the keyboard,
Enter, a range that is none, an image field made a field per page, one
undo, and no section for a signature field.
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloudpdf-com Ready Ready Preview Dec 1, 2026 1:20pm UTC
embed-pdf-snippet Error Error Dec 1, 2026 1:20pm UTC
embed-pdf-viewer-react-mui Error Error Dec 1, 2026 1:20pm UTC
embed-pdf-viewer-svelte-tailwind Error Error Dec 1, 2026 1:20pm UTC
embed-pdf-viewer-vue-vuetify Error Error Dec 1, 2026 1:20pm UTC
embedpdf-com Ready Ready Preview Dec 1, 2026 1:20pm UTC

Request Review

…e a listed group

Five findings of the review of the pull request, four of them reproduced
on its code, and three of them already on main through `addWidget()`,
`create()` and a delete's undo.

- A field stored as one object with its widget, on a page that keeps its
  annotations in a list of their own (`/Annots 7 0 R`): the undo of an
  add that split it put the field's dictionary back but left the split
  widget on the page, so the field named its old widget and the page
  showed the new one. A capture of the page dictionary doesn't reach
  such a list. The undo of an add is now one step, `widgets.added`, for
  `addWidget()` and a repeat alike: each new widget leaves its page
  through the page's list, the split widget leaves too and the field's
  own entry goes back in its place, and the redo splits it there again.
  A single `addWidget()` on such a page left its widget behind the same
  way, and its redo answered `forms.removeWidget`; both are mended.
- A radio group whose values a list in the field names (`/Opt`): a new
  button read back `Yes` and never went on with its value. The engine
  writes no `/Opt`, so a new widget can't join such a group:
  `addWidget()` refuses it with `InvalidArg`, and so does a repeat as
  boxes. As fields each page gets a group of its own, with the right
  values.
- An undo deleted a widget someone moved since: the repeat's checked the
  field's dictionary only, and a create's, a copy's and an import's
  compared the field without its widgets. Each now keeps every widget it
  made as the guard: an add or a repeat as boxes is left alone when one
  changed, and a field whose widget changed stays.
- A redo brought back `customer_2` beside `customer_2.address`: it
  checked the exact name. It, and a deleted field's undo, now leave out
  a name another field sits under or above (`fieldNameTaken`).
- A repeat counted its limits after it planned every widget: 100
  widgets onto 2,000 pages built 200,000 placements before the refusal.
  `planFormRepeats` takes the limits and refuses before it plans.

Test: four new cases in `runFormRepeatConformance` (11 now) on both
engines: a split field on a page with its own list, undone and redone
through the repeat and through `addWidget()`; a listed radio group
refused, and repeated as fields; an undo after a widget moved, for
boxes, fields and a create; a redo after the name became a parent. Two
planner unit tests: the limits, and the listed group. The change
conformance's round trips pass as before.
The API reference check failed: the manifest was made from the OpenAPI
document before the op was added. `pnpm api:sync` made it again; the
generated SDKs were already current.
… reorder made since

Four findings of the second review of the pull request, the first two
reproduced on its code.

- A field whose list of widgets is an object of its own (`/Kids 8 0 R`):
  the undo of a repeat, or of `addWidget()`, put the field's dictionary
  back, which only refers to that list, so the list kept the new widgets.
  After three rounds the saved file's `/Kids` named three objects it
  doesn't have. The undo now takes each new widget out of the field
  through the field's own list (`EPDFForm_DetachWidget`), wherever the
  file keeps it, before it leaves its page. The redo puts each widget
  back on its page, lets it join the field again in its order
  (`EPDFForm_AttachWidget`), and puts its dictionary back exactly as the
  undo found it, look and all.
- The undo of a split put the field back at its place from before the
  repeat, which took back a reorder of the split widget made since. It
  now goes where the split widget stands, and the redo puts the split
  widget where the field stands.
- The viewer planned every new widget on its main thread before the
  engine could refuse past its limits: `formRepeatScopeOf` counts what a
  repeat would reach without planning it, and the plugin and the planner
  both use it.
- The read-back of new checkboxes and radio buttons scanned the field
  once for every new widget, text widgets included. It runs only when a
  new widget has an on-state, over the field's widgets indexed once.

The fifth, a group whose `/Opt` entries match its state names, needs a
fork read of a button group's `/Opt` and goes with the work on that list.

Test: two new cases in `runFormRepeatConformance` (13 now) on both
engines: three rounds of add and undo and a redo on a field whose
`/Kids` is its own object, through a repeat and through `addWidget()`,
reading the saved file's list each time; and an undo and a redo after
the split widget, and then the field, were reordered. A unit test for
`formRepeatScopeOf`.
…d since

A finding of the third review of the pull request, reproduced on its
code: a field whose list of widgets is an object of its own (`/Kids 8 0
R`), repeated, its first widget then deleted, and the repeat undone. The
guard compared the field's dictionary, which only refers to that list,
so it passed; the undo then took the field's last widget out, and was
refused with `NotFound`. With the list in the field's dictionary the
same steps were left alone.

The step keeps the field's widgets, by object number, as the step
before left them, and is left alone when the field lists others now.

Test: a case in `runFormRepeatConformance` (14 now) on both engines: a
repeat on a field whose `/Kids` is its own object, its first widget
deleted since, and an undo that is left alone.
A checkbox or radio group may name its values in a list in the field
(/Opt), as Acrobat writes values that repeat or aren't plain names. A
new button in such a group read back Yes, so form.repeat() refused the
group and addWidget() gave the wrong value. The runtime's attach now
writes the new button's entry (embedpdf/runtime#139), and the engine
uses it.

- The fact: hasValuesList on CheckboxField and RadioField, read from
  the runtime's form model (EPDFForm_HasFieldValuesList). The wire
  member is required; an older server's group reads false. A created
  group predicts false. PR 1190's guess (valuesNamedByList) is gone.
- addedToggleStates() picks each new button's on-state name: a
  repeat's source name, else the name of the field's buttons with that
  value, else the value itself, or for a listed group the lowest number
  no button uses.
- FormMutator.addWidgets() passes each button's value to the attach;
  a repeat keeps its source's name, so copies switch with it. The add
  step keeps the values, so its redo writes the entries back.
- formRepeat no longer refuses a listed group.

Conformance (repeat suite, both engines): a listed group repeats with
its values and switches in unison; undo and redo of a repeat and of an
addWidget put the saved list back; a list that repeats the on-state
names (/Opt [(0) (1)]); a checkbox and a one-button group whose list
names Yes, by repeat and by addWidget.

Contract, SDK, docs and api reports follow. The bindings carry the
attach's new argument and the new getter: until the runtime pin, the
calls into the runtime fail.
The release adds one runtime change to a0b1daa34: a widget joining a
checkbox or radio group whose values /Opt names gets its entry, a
widget that leaves takes its entry along, and the form model says
which groups have the list (embedpdf/runtime#139). The previous
commit uses all three.

The bindings generated from the release's headers are the ones the
previous commit carries. runtime-src moves to the pin. The pin file's
nine checksums are the ones the release's assets carry.
The snapshot was taken before prettier joined the last two lines of a
call in addWidgets(), so CI's api:check saw a change.
Repeat and add buttons in a group whose values /Opt names
@bobsingor
bobsingor merged commit 94938d4 into main Dec 1, 2026
51 of 57 checks passed
@bobsingor
bobsingor deleted the feature/form-repeat branch December 1, 2026 12:15
@github-actions github-actions Bot mentioned this pull request Dec 1, 2026
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
The fake engine's forms service has repeat (embedpdf#1190). Checkbox and radio
fixture rows carry hasValuesList: false, as engine rows now do (embedpdf#1190,
runtime#139). The signature suite answers a fill or a clear through
doc.apply with a forms.setSignatureAppearance item, since embedpdf#1187 stages
each as one change instead of calling forms.setSignatureAppearance; the
fill-and-clear case defers that apply as it deferred the direct call.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
Checkbox and radio rows gain hasValuesList (embedpdf#1190, runtime#139);
changes/kinds.json gains forms.repeat at 3.5 and apiVersion 3.5; an undo
of an added widget reports what embedpdf#1190's addedWidgetsBack does
(image-fields, picture-buttons).
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
Form rows gain hasValuesList (embedpdf#1190); a gesture draft records its press
point and box kinds gain handleLayout (embedpdf#1186); armed stamp reads return
preview (embedpdf#1189); signature fills and clears go through doc.apply (embedpdf#1187).
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
…heir values

hasValuesList (embedpdf#1190, runtime#139) read through a new FormField::has_values_list
wrapper over EPDFForm_HasFieldValuesList; an older side reads false.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
…and check from the field (embedpdf#1190)

addedToggleStates and addedWidgetChecked, with addedToggleStates.test.ts ported.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
…e, and deleteFields removes many (embedpdf#1190)

FormMutator.addWidgets: every place checked first, flags per place, the
toggle value written into /Opt through attach_widget, radiosInUnison, and
the new widgets checked where the field shows their value. addWidget is
one place of it. deleteFields: one calculation-order write and raw entry
removals per page.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
…mbedpdf#1190)

The op and its item, the repeat plan (formRepeat.ts, planFormRepeat.ts),
both modes, and the steps widgets.added and fields.repeat: an undo takes
the new widgets out of the field list and off each page wherever the file
keeps them, puts a split field back where its widget stands now, leaves a
field whose list changed since, and a redo puts the /Opt value back.
forms.addWidget takes the same step. A field remove keeps its widget
guards, and a restore checks names sat under or above.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
…eat.json (embedpdf#1190)

Each of the 17 tests runs against the recording engine with its own
expects, a case per document it opens (20), the fixture per case, an
exchange per step with the events a change published, and a save answered
by what the runner reads of the file, not its bytes.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
… trip (embedpdf#1190)

A case may carry its own fixture, and a save is compared by the array
objects and /Opt lists the runner reads of the saved file.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
…e leaves the index (embedpdf#1190)

repeat(ref, { pages, as }) asks the engine's rule first (engine/repeat.rs:
formRepeatScopeOf, formRepeatRefusalOf, formRepeatDefaultOf) and stages
one forms.repeat op; nothing is staged when no page gets anything.
canRepeat reads the same refusal. A prediction leaves a repeat to the
engine's answer and undoes nothing of it. forms.widgetRemoved drops the
rows of changed widgets no page shows (withoutGoneWidgets), and a new
checkbox or radio predicted from its draft has hasValuesList false.
roanutil added a commit to MFB-Technologies-Inc/embed-pdf-viewer that referenced this pull request Dec 2, 2026
…ses (embedpdf#1190, embedpdf#1187)

repeat on all pages, a page list, as fields by default for an image
field and when asked, every refusal, and without form design;
setSigningDate's writes, skips and a refused write; validateConfirmed
against a write still on its way; commitDraftTexts through every way a
draft leaves or stays, and a download's flush.

This branch had an error being deployed

4 failed and 2 active deployments
Preview – embedpdf-com — 16dda652 Deployed Dec 1, 2026 by vercel[bot]
Preview – cloudpdf-com — 16dda652 Deployed Dec 1, 2026 by vercel[bot]
Preview – embed-pdf-snippet — 16dda652 Deployed Dec 1, 2026 by vercel[bot]
Preview – embed-pdf-viewer-vue-vuetify — 16dda652 Deployed Dec 1, 2026 by vercel[bot]
Preview – embed-pdf-viewer-react-mui — 16dda652 Deployed Dec 1, 2026 by vercel[bot]
Preview – embed-pdf-viewer-svelte-tailwind — 16dda652 Deployed Dec 1, 2026 by vercel[bot]
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