Default styling for Document #1297
-
Hello, sorry but new to Docx generation, I cant seem to find documentation on how to set the default styles for a document. My use case is that I want all font generated to be 'bold' and have the font-family of 'Calibri' This is what Ive tried so far: const paragraphPhoto = new Paragraph({
text,
style: `font-family: "Calibri; bold: true;`,
})
const doc = new Document({
sections: [{
properties: {},
children: [paragraphPhoto]
}],
}); I cant seem to get it too work. There are no options for Document.styles.Paragraph, only listParagraph. I can not use Text Runs, because I am using a template generator to render images and the generator does not like the template variable in a TextRun. Said it must be a blank paragraph. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try something like this....
|
Beta Was this translation helpful? Give feedback.
Try something like this....