Fix demo
This commit is contained in:
@ -9,6 +9,14 @@ const doc = new Document({
|
|||||||
children: [new Paragraph("Hello World")],
|
children: [new Paragraph("Hello World")],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
properties: {
|
||||||
|
page: {
|
||||||
|
pageNumbers: {
|
||||||
|
start: 1,
|
||||||
|
formatType: PageNumberFormat.DECIMAL,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
headers: {
|
headers: {
|
||||||
default: new Header({
|
default: new Header({
|
||||||
children: [new Paragraph("First Default Header on another page")],
|
children: [new Paragraph("First Default Header on another page")],
|
||||||
@ -19,13 +27,21 @@ const doc = new Document({
|
|||||||
children: [new Paragraph("Footer on another page")],
|
children: [new Paragraph("Footer on another page")],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
properties: {
|
|
||||||
pageNumberStart: 1,
|
|
||||||
pageNumberFormatType: PageNumberFormat.DECIMAL,
|
|
||||||
},
|
|
||||||
children: [new Paragraph("hello")],
|
children: [new Paragraph("hello")],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
properties: {
|
||||||
|
page: {
|
||||||
|
size: {
|
||||||
|
orientation: PageOrientation.LANDSCAPE,
|
||||||
|
},
|
||||||
|
pageNumbers: {
|
||||||
|
start: 1,
|
||||||
|
formatType: PageNumberFormat.DECIMAL,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
headers: {
|
headers: {
|
||||||
default: new Header({
|
default: new Header({
|
||||||
children: [new Paragraph("Second Default Header on another page")],
|
children: [new Paragraph("Second Default Header on another page")],
|
||||||
@ -36,16 +52,16 @@ const doc = new Document({
|
|||||||
children: [new Paragraph("Footer on another page")],
|
children: [new Paragraph("Footer on another page")],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
size: {
|
|
||||||
orientation: PageOrientation.LANDSCAPE,
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
pageNumberStart: 1,
|
|
||||||
pageNumberFormatType: PageNumberFormat.DECIMAL,
|
|
||||||
},
|
|
||||||
children: [new Paragraph("hello in landscape")],
|
children: [new Paragraph("hello in landscape")],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
properties: {
|
||||||
|
page: {
|
||||||
|
size: {
|
||||||
|
orientation: PageOrientation.PORTRAIT,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
headers: {
|
headers: {
|
||||||
default: new Header({
|
default: new Header({
|
||||||
children: [
|
children: [
|
||||||
@ -59,12 +75,20 @@ const doc = new Document({
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
size: {
|
|
||||||
orientation: PageOrientation.PORTRAIT,
|
|
||||||
},
|
|
||||||
children: [new Paragraph("Page number in the header must be 2, because it continues from the previous section.")],
|
children: [new Paragraph("Page number in the header must be 2, because it continues from the previous section.")],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
properties: {
|
||||||
|
page: {
|
||||||
|
size: {
|
||||||
|
orientation: PageOrientation.PORTRAIT,
|
||||||
|
},
|
||||||
|
pageNumbers: {
|
||||||
|
formatType: PageNumberFormat.UPPER_ROMAN,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
headers: {
|
headers: {
|
||||||
default: new Header({
|
default: new Header({
|
||||||
children: [
|
children: [
|
||||||
@ -78,10 +102,6 @@ const doc = new Document({
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
properties: {
|
|
||||||
pageNumberFormatType: PageNumberFormat.UPPER_ROMAN,
|
|
||||||
orientation: PageOrientation.PORTRAIT,
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
new Paragraph(
|
new Paragraph(
|
||||||
"Page number in the header must be III, because it continues from the previous section, but is defined as upper roman.",
|
"Page number in the header must be III, because it continues from the previous section, but is defined as upper roman.",
|
||||||
@ -89,6 +109,17 @@ const doc = new Document({
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
properties: {
|
||||||
|
page: {
|
||||||
|
size: {
|
||||||
|
orientation: PageOrientation.PORTRAIT,
|
||||||
|
},
|
||||||
|
pageNumbers: {
|
||||||
|
start: 25,
|
||||||
|
formatType: PageNumberFormat.DECIMAL,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
headers: {
|
headers: {
|
||||||
default: new Header({
|
default: new Header({
|
||||||
children: [
|
children: [
|
||||||
@ -102,13 +133,6 @@ const doc = new Document({
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
size: {
|
|
||||||
orientation: PageOrientation.PORTRAIT,
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
pageNumberFormatType: PageNumberFormat.DECIMAL,
|
|
||||||
pageNumberStart: 25,
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
new Paragraph(
|
new Paragraph(
|
||||||
"Page number in the header must be 25, because it is defined to start at 25 and to be decimal in this section.",
|
"Page number in the header must be 25, because it is defined to start at 25 and to be decimal in this section.",
|
||||||
|
Reference in New Issue
Block a user