Fix PDF TOC header
Fixes an error where the PDF TOC header could not be repeated. PDFmake seems to ignore soft references to objects. It will print them exactly once and then ignore them. Also Adds the name of a parent category in a TOC-Table
This commit is contained in:
parent
93e37720dc
commit
31ab7d387c
@ -132,7 +132,7 @@ export class MotionPdfCatalogService {
|
||||
body: [
|
||||
[
|
||||
{
|
||||
text: category.getTitle(),
|
||||
text: category.nameWithParentAbove,
|
||||
style: !!category.parent ? 'tocSubcategoryTitle' : 'tocCategoryTitle'
|
||||
}
|
||||
]
|
||||
@ -158,7 +158,12 @@ export class MotionPdfCatalogService {
|
||||
}
|
||||
|
||||
catTocBody.push(
|
||||
this.pdfService.createTocTableDef(tocBody, StyleType.CATEGORY_SECTION, layout, header)
|
||||
this.pdfService.createTocTableDef(
|
||||
tocBody,
|
||||
StyleType.CATEGORY_SECTION,
|
||||
layout,
|
||||
header ? JSON.parse(JSON.stringify(header)) : null
|
||||
)
|
||||
);
|
||||
|
||||
catTocBody.push(this.pdfService.getPageBreak());
|
||||
|
Loading…
Reference in New Issue
Block a user