npm install ngx-pdf-editor
Import NgxPdfEditorService in constructor.
Add Tool to Editor
this.pdfEditorService.addTool(
new EditorTool('text',
'Testo',
'text_fields',
(event) => this.pdfEditorService.addElement<PDFTextElement>(PDFTextElement, event, undefined, undefined, true),
PDFTextElement)
);
- PDFTextElement
- PDFImageElement
- PDFSignatureElement
const config: MatDialogConfig = new MatDialogConfig();
const editorConfig: EditorConfig = {
title: "Editor PDF",
file: {{yourFile}} (it must be a File object)
}
config.data = editorConfig;
this.matDialog.open(NgxPdfEditorComponent, config);
MIT