# @embedpdf/angular — ./redaction EpdfRedaction [ClassDeclaration] (from packages/framework/angular/redaction/src/redaction.ts): @Injectable({ providedIn: 'root'} ) export class EpdfRedaction extends pluginService({ name: 'EpdfRedaction', feature: 'withRedaction()', token: RedactionToken, state: redactionState, methods: [ 'markSelection', 'markArea', 'markPage', 'markMatches', 'unmark', 'clearPending', 'updateLabel', 'listPending', 'getPending', 'getPendingCount', 'estimateCollateral', 'applyAll', 'apply', 'applyPages', 'canMark', 'canUnmark', 'canUpdateLabel', 'canApply', 'isApplying', 'getLastResult', ], events: ['onApplied', 'onPendingChanged'], } ){ readonly pending: Signal = this.binding.select( (redaction) => redaction.listPending(), NO_MARKS, ); pendingOn(page: PageRef | number | (() => PageRef | number)): Signal{ const pageOf = typeof page === 'function' ? page : () => page; return this.binding.select((redaction) => redaction.listPending({ page: pageOf()} ), NO_MARKS); } } REDACTION_DEFAULTS [VariableDeclaration] (from packages/plugin/redaction/src/contract.ts): REDACTION_DEFAULTS: RedactionSettings ={ overlay:{ fill: '#000000', text:{ color: '#ffffff', fontFamily: 'helvetica', fontSize: 0} , } , } RedactionAppliedEvent [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionAppliedEvent{ readonly result: RedactionApplyResult; readonly origin: EventOrigin; } RedactionApplyResult [InterfaceDeclaration] (from packages/engine/core/src/mutation/RedactionApplyResult.ts): export interface RedactionApplyResult{ scope: RedactionApplyScope; results: RedactionApplyItemResult[]; removedAnnotationCount: number; meta: MutationMeta; } RedactionCapability [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionCapability extends SettingsApi{ canMark(): boolean; canUnmark(ref: AnnotationRef): boolean; canUpdateLabel(ref: AnnotationRef): boolean; canApply(): boolean; isApplying(): boolean; getLastResult(): RedactionApplyResult | null; listPending(filter?: RedactionMarkFilter): readonly RedactionMark[]; getPending(ref: AnnotationRef): RedactionMark | null; getPendingCount(page?: PageRef | number): number; estimateCollateral(refs?: readonly AnnotationRef[]): RedactionCollateral; markSelection(options?: OperationOptions): Promise<{ marks: readonly RedactionMark[]} >; markArea( page: PageRef | number, bounds: Rect, options?: OperationOptions, ): Promise<{ mark: RedactionMark} >; markPage(page: PageRef | number, options?: OperationOptions): Promise<{ mark: RedactionMark} >; markMatches( query: SearchQuery, options?:{ pages?: readonly (PageRef | number)[]} & OperationOptions, ): Promise<{ marks: readonly RedactionMark[]} >; unmark( refs: readonly AnnotationRef[], options?: OperationOptions, ): Promise>; clearPending(options?: OperationOptions): Promise>; updateLabel( ref: AnnotationRef, patch: RedactionLabelPatch, options?: OperationOptions, ): Promise<{ mark: RedactionMark} >; apply(refs: readonly AnnotationRef[], options?: OperationOptions): Promise; applyAll(options?: OperationOptions): Promise; applyPages( pages: readonly (PageRef | number)[], options?: OperationOptions, ): Promise; readonly onApplied: EventHook; readonly onPendingChanged: EventHook; } RedactionCollateral [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionCollateral{ readonly count: number; readonly refs: readonly AnnotationRef[]; } RedactionConfig [TypeAliasDeclaration] (from packages/plugin/redaction/src/contract.ts): export type RedactionConfig = DeepPartial; RedactionLabelPatch [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionLabelPatch{ overlayText?: string | null; repeat?: boolean; } RedactionMark [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionMark{ readonly ref: AnnotationRef; readonly page: PageRef; readonly pageIndex: number; readonly kind: 'area' | 'text'; readonly bounds: Rect; readonly overlayText: string | null; readonly repeat: boolean; } RedactionMarkFilter [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionMarkFilter{ readonly page?: PageRef | number; } RedactionPendingChangedEvent [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionPendingChangedEvent{ readonly pages: readonly PageRef[]; } RedactionSettings [InterfaceDeclaration] (from packages/plugin/redaction/src/contract.ts): export interface RedactionSettings{ readonly overlay:{ readonly fill: string; readonly text:{ readonly color: string; readonly fontFamily: FontName; readonly fontSize: number; } ; } ; } RedactionState [InterfaceDeclaration] (from packages/plugin/redaction/src/state.ts): export interface RedactionState{ readonly pendingCount: number; readonly applying: boolean; readonly lastResult: RedactionApplyResult | null; } RedactionToken [VariableDeclaration] (from packages/plugin/redaction/src/token.ts): RedactionToken = createCapabilityToken('redaction', { hint: `add redactionPlugin() from '@embedpdf/plugin-redaction' to your plugins list`, promises:{ markSelection: true, markArea: true, markPage: true, markMatches: true, unmark: true, clearPending: true, updateLabel: true, apply: true, applyAll: true, applyPages: true, } , } ) redactionPlugin [VariableDeclaration] (from packages/plugin/redaction/src/redaction.plugin.ts): redactionPlugin = (config?: RedactionConfig) => definePlugin({ id: 'redaction', token: RedactionToken, scope: 'document', requires: [AnnotationToken], optional: [SelectionToken, SearchToken], state: initialRedactionModel, settings:{ defaults: REDACTION_DEFAULTS, registered: config} , create: createRedactionController, } ) redactionState [VariableDeclaration] (from packages/plugin/redaction/src/state.ts): redactionState = defineState(RedactionToken, { read: (redaction): RedactionState => ({ pendingCount: redaction.getPendingCount(), applying: redaction.isApplying(), lastResult: redaction.getLastResult(), } ), empty:{ pendingCount: 0, applying: false, lastResult: null, } , } ) withRedaction [FunctionDeclaration] (from packages/framework/angular/redaction/src/redaction.ts): export function withRedaction(options?: RedactionConfig): EmbedPdfFeature{ return{ plugins: [redactionPlugin(options)], services: [EpdfRedaction]} ; }