我有一个div,其中一些组件呈角度。然后,我想将此div导出为PDF文件,但生成的pdf文件为空白页
<div id="report" #report>
<app-header [headerTitle]="'SOME-HEADER'"
[headerID]="000001"></app-header>
<app-body
[empresa-nome]="some name"
[empresa-tipo]="'privado'" >
</app-body>
</div>
let doc = new jsPdf();
let specialElemmentsHandler = {
'#editor': function(element, renderer){
return true;
}
};
let content = this.report.nativeElement;
doc.fromHTML(content, 15, 15, {
'width' : 190,
'elementsHandlers' : specialElemmentsHandler
});
doc.save('doc.pdf');