# @embedpdf/angular ## 3.3.0 ### Minor Changes - [#1091](https://github.com/embedpdf/embed-pdf-viewer/pull/1091) by [@bobsingor](https://github.com/bobsingor) – Each feature entry exports its plugin's commands as a list: `stageCommands` from `/stage`, `interactionCommands` from `/interaction`, `selectionCommands` from `/selection`, `annotationCommands` from `/annotation`, `historyCommands` from `/history`, `renderCommands` from `/render` and `documentCommands` from `/runtime`. `standardCommands` is these lists joined. To leave some commands out, spread the lists you want in place of `standardCommands`. `/interaction` also exports `toolCommand(id)`, the command behind `tool:`, to give a tool of your own a shortcut. `standardCommands` gains `history:undo` (`Mod+Z`) and `history:redo` (`Mod+Shift+Z`, `Mod+Y`), from the history plugin's list. They run the history plugin's undo and redo, and stay disabled without `withHistory()` or while there is nothing to undo or redo. A command of your own with one of these ids still replaces the standard one when it comes after `...standardCommands` in the `commands` setting of `withCommands()`. With the standard commands in use, `registerCommand()` with one of these ids now needs `{ replace: true }`. - [#1088](https://github.com/embedpdf/embed-pdf-viewer/pull/1088) by [@bobsingor](https://github.com/bobsingor) – `EpdfSignature` has `addValidationInfo()` and `canAddValidationInfo()`, as the signature plugin does. ### Patch Changes - [#1092](https://github.com/embedpdf/embed-pdf-viewer/pull/1092) by [@bobsingor](https://github.com/bobsingor) – A production build no longer warns that `pvtsutils` is not ESM. The signature package moved to `pkijs` 4 and `asn1js` 4, which no longer use it. An `allowedCommonJsDependencies` entry for `pvtsutils` can go. ## 3.2.0 ### Minor Changes - [#1071](https://github.com/embedpdf/embed-pdf-viewer/pull/1071) by [@bobsingor](https://github.com/bobsingor) – `EpdfAnnotation` has `duplicate(refs, options)`, `canDuplicate(refs)`, `isMovable(ref)`, `selection.duplicate(options)` and `selection.canDuplicate()`. - [#1075](https://github.com/embedpdf/embed-pdf-viewer/pull/1075) by [@bobsingor](https://github.com/bobsingor) – `EpdfForm` has `duplicate(fields, options)` and `duplicateWidgets(widgets, options)`. ### Patch Changes - [#1074](https://github.com/embedpdf/embed-pdf-viewer/pull/1074) by [@bobsingor](https://github.com/bobsingor) – `` draws a field's picture where the field is now. A field that was moved, in Form design or with `updateWidget()`, kept its picture at the old place until the page's pictures were loaded again: the field showed in one place and took clicks in another. ## 3.1.0 ## 3.0.0 ### Major Changes - [#711](https://github.com/embedpdf/embed-pdf-viewer/pull/711) by [@bobsingor](https://github.com/bobsingor) – Introduces the rebuilt Angular adapter for EmbedPDF v3. It provides reactive bindings, structural viewer and stage components, injectable capabilities, and headless feature layers through focused secondary entry points. ### Minor Changes - [#841](https://github.com/embedpdf/embed-pdf-viewer/pull/841) by [@bobsingor](https://github.com/bobsingor) – Annotations in Angular: `@embedpdf/angular/annotation`. - `withAnnotation(options)` and `inject(EpdfAnnotation)`: the plugin's methods (`create()`, `update()`, `delete()`, `move()`, `export()`, `import()`, …), the State table as signals (`status()`, `selected()`, `hovered()`, `editing()`), the parts as namespaces (`selection`, `draft`, `text`, `tools`, `stamps`, `links`), every event as a stream (`created$`, `writeFailed$`, `selectionChanged$`, `tools.defaultsChanged$`, …) and the settings. The reads a template follows are members that take a value or a function: `watch(filter)`, `anchorOf(ref)`, `selection.properties()`, `tools.defaultsOf(id)` and `tools.propertiesOf(id)`. The checks (`canCreate()`, `canDelete(ref)`, `selection.canGroup()`, `stamps.isArmed()`) follow the document in a template. - `inject(EpdfComments)`: every thread with its page label as `threads()`, one as `threadOf(ref)`, the verbs (`reply()`, `setText()`, `setStatus()`, `setMarked()`, `delete()`, `deleteThread()`), the checks and `threadChanged$`. - `` draws a page's annotations, the selection's outline and handles, the tool's preview and the text boxes being typed in. Your own look for some annotations is an `` inside it (a subtype works too: `epdfAnnotation="stamp"`); it draws into a frame placed, turned and scaled like the annotation, gets the layer's own drawing as `native`, and with `epdfAnnotationInteractive` (or a function of the active tool) takes the pointer. `` and `` draw the handles your way. - `[epdfRichTextEditor]="annotation"` makes your element a text box's editor in a look, with the box's body style and `editing()` (`#editor="epdfRichTextEditor"`). - ``, `` (with `draft()`) and `` float your UI next to the selection, a polygon being drawn and a turn in progress, inside ``. - `withFilePicker(provider?)` gives the stamp and attachment tools their file: the browser's file dialog, your own function, or `null`, for every document the viewer opens. - [#841](https://github.com/embedpdf/embed-pdf-viewer/pull/841) by [@bobsingor](https://github.com/bobsingor) – Add the Angular services for working with documents. `@embedpdf/angular/view-manager` has `withViewManager()` and `EpdfViewManager`, with `panes()` and `focusedPaneId()` as signals, the calls that split, close and move panes and their tabs, and `paneCreated$`, `paneRemoved$`, `focusChanged$` and `documentMoved$`. `@embedpdf/angular/page-edit` has `withPageEdit()` and `EpdfPageEdit`, to rotate, move, insert, delete and extract pages. `@embedpdf/angular/metadata` has `withMetadata()` and `EpdfMetadata`: the standard fields as `fields()` and their load state as `status()`, `update()`, `refresh()`, `canUpdate()`, `updated$` and `resynced$`, and your own fields as the `custom` namespace (`custom.fields()`, `custom.status()`, `custom.update()`, `custom.refresh()`, `custom.updated$`), which is never itself a signal. `@embedpdf/angular/actions` is now `withActions(config)`, `EpdfActions` (the calls, the checks, the settings and the streams such as `diagnosticReported$`) and `withActionsUi(handlers)`, which installs the browser's defaults for websites, printing and alerts on the active document's actions, in the same change that makes it ready; `handlers` replace any of them, and can be a function that runs once in an injection context, so they can use your services. `injectActionsUiAdapter()` is gone. Each entry re-exports its plugin, so registration travels with the UI. Every plugin service now has `getSettings()` next to `settings()`, working with or without a document. A check (`canUpdate()`, `canCopy()`, `isScriptingEnabled()`) read in a template, a `computed()` or an `effect()` is read again after each change of the viewer and wakes its reader only when its answer changes, so a button it disables follows the document, the selection and the permissions. A namespace's calls are built with `CapabilityBinding.namespaceMethod()`. - [#841](https://github.com/embedpdf/embed-pdf-viewer/pull/841) by [@bobsingor](https://github.com/bobsingor) – Forms and signatures in Angular: `@embedpdf/angular/form` and `@embedpdf/angular/signature`. - `withForm(config)` and `inject(EpdfForm)`: the plugin's methods for reading, filling, form data and building (`setValue()`, `importValues()`, `export()`, `validate()`, `create()`, `update()`, `delete()`, …), the State table as signals (`fields()`, `status()`, `formKind()`, `selectedField()`), every event as a stream (`valueChanged$`, `validationRejected$`, `fieldCreated$`, …) and the settings. The checks (`canFill()`, `canDesign()`) follow the document in a template. - `form.valueOf(ref)` is one field's value as a signal, which wakes only when that field changes. `form.controlOf(ref)` is a field as a Reactive Forms `FormControl` for an input of your own (``): it holds the field's value, takes every change of it, fills in the field with the form's checks and scripts when it changes, and is disabled while the field can't be filled in. It needs `@angular/forms`, now an optional peer dependency. - `` puts a real HTML control over each field on its page: a text box that edits in the field's font, checkboxes and radio buttons, a dropdown, a list that keeps its own scroll position, push buttons that run their action, and "sign here" on a signature field with the signature plugin. A press on a field stays out of the page below and still reaches the field's PDF actions; the colors follow the form settings and the `--epdf-form-*` CSS variables. - `withSignature(config)` and `inject(EpdfSignature)`: signing, filling and checking signature fields (`sign()`, `placeMark()`, `fillField()`, `validate()`, …), `signatures()`, `protection()`, `target()`, `busy()`, `pending()` and `status()` as signals, the events as streams (`signed$`, `invalidationPredicted$`, `targetChanged$`, `signRequested$`, …), the settings, and `signerRows()`: the people whose marks the stamp plugin holds, each with their signatures and initials. The signers (`webCryptoSigner`, `remoteSigner`, `personalSigner` with `indexedDbKeyStore`, `createTestSigner`) come with the entry. - [#841](https://github.com/embedpdf/embed-pdf-viewer/pull/841) by [@bobsingor](https://github.com/bobsingor) – The adapter is set up and used the Angular way. - `provideEmbedPdf(config, ...features)` replaces ``. It works in a component's `providers` (and that component can inject the viewer's services), a route's, or the app config. Plugins are features: `withStage()`, `withRender()`, `withInteraction()`, `withFeedback()`, in place of `stagePlugin()` arrays. `engine` may be a function that returns a promise (`() => import('@embedpdf/engine').then((m) => m.localEngine())`); the config also takes `identity`, `scope`, `accent` and `page`. - One service per plugin, in place of the `inject*()` functions: `inject(EpdfDocuments)`, `inject(EpdfDocument)` (with `pages()`), `inject(EpdfRender)`, `inject(EpdfInteraction)` (with `overrideCursor()`), `inject(EpdfViewer)` (`settings()`, `updateSettings()`, `status()`). Each has the plugin's methods, its State values as signals, its events as RxJS streams (`openFailed$`), and its settings. Under `[epdfDocumentScope]` they act on that document. `pluginService()` builds a plugin's service. - `` is the Stage's API: every method, its State as signals (`zoomLevel()`, `currentPageIndex()`, `activeRules()`), `settings()`, `scrollMetrics()`, and streams (`pageChanged$`, `cameraChanged$`). New: `[(page)]`, `[(zoom)]`, and `[document]`, which opens a document for the Stage and follows the value. `injectZoom()`, `injectPages()`, `injectLayout()`, `injectStageSettings()` and `[epdfStageScope]` are removed. - `*epdfDocumentGate="let document; fallback: opening; locked: locked; error: failed"`: the ready document as context, and templates for a document waiting for its password and one that failed to open. - New: ``, ``, the render layer's sharp tiles when zoomed in, `epdfTheme()` and `saveFile()`. - Setup mistakes are numbered errors with the fix and a link: `EPDF-101` to `EPDF-105`. - [#841](https://github.com/embedpdf/embed-pdf-viewer/pull/841) by [@bobsingor](https://github.com/bobsingor) – Stamps, measurements and redaction in Angular: `@embedpdf/angular/stamp`, `/measurement` and `/redaction`. Each entry re-exports its plugin, so registration travels with the UI. - `withStamp(options)` and `inject(EpdfStamp)`: the Stamps page's methods (`importLibrary()`, `createAsset()`, `armAsset()`, `placeAsset()`, …), the armed stamp as `armedAsset()`, the events as streams (`libraryChanged$`, `armChanged$`, …) and the settings. The libraries are `libraries()`, one library's stamps `assetsOf({ libraryId })`, and a stamp's picture `previewUrlOf(id)`, an image URL that follows the stamp and a picture that arrives later, and is released with the component that asked for it. `assetsOf()` and `previewUrlOf()` take a value or a function that reads signals. `persistStampLibraries(stamp, store)` and `restoreStampLibraries(stamp, store)` take the service, and `indexedDbByteStore()` is the browser's store for them. - `withMeasurement(options)` and `inject(EpdfMeasurement)`: the scales, calibration and measuring, `busy()`, `calibrationRequest()` and `lastReports()` as signals, a page's scale as `scaleOf(page)` and a measurement's `{ kind, value, label }` as `readoutOf(ref)`, the events as streams (`scaleChanged$`, `calibrationRequested$`, …) and the settings. - `withRedaction(options)` and `inject(EpdfRedaction)`: marking, applying, `pendingCount()`, `applying()` and `lastResult()` as signals, the marks waiting as `pending()` and one page's as `pendingOn(page)`, the checks (`canApply()`, `canUnmark(ref)`, …), which follow the document in a template, `applied$` and `pendingChanged$`, and the settings. - [#841](https://github.com/embedpdf/embed-pdf-viewer/pull/841) by [@bobsingor](https://github.com/bobsingor) – Your app's UI in Angular: commands, the toolbar, panels and translations. - `@embedpdf/angular/commands`: `withCommands({ commands })`, `standardCommands`, and `inject(EpdfCommands)` with the plugin's methods, `executed$`, the settings, and `commandOf(id)`, one command as a signal. `