diff --git a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts index ff94d803f..32a76c82d 100644 --- a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts @@ -70,6 +70,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy { this.wvInstance = instance; this._viewerSyncService.registerViewer(this.fileType, this.wvInstance); this._configureTextPopup(); + this._configureHeader(); instance.docViewer.on('documentLoaded', this.wvDocumentLoadedHandler) instance.loadDocument(pdfBlob, {filename: this.fileStatus ? this.fileStatus.filename : 'file.pdf'}); this.fileReady.emit(); @@ -101,6 +102,14 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy { } private _configureTextPopup() { + this.wvInstance.disableElements([ + 'textHighlightToolButton', + 'textUnderlineToolButton', + 'textSquigglyToolButton', + 'textStrikeoutToolButton', + 'linkButton', + ]); + this.wvInstance.textPopup.add({ type: 'actionButton', img: '/assets/icons/general/add.svg', @@ -112,6 +121,11 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy { }); } + private _configureHeader() { + this.wvInstance.disableElements(['ribbons']); + this.wvInstance.setToolbarGroup('toolbarGroup-View'); + } + ngOnDestroy(): void { this._viewerSyncService.deregisterInstance(this.fileType); }