added border specs, createBorder method, and color attribute to setProperties

This commit is contained in:
Noah Schechter
2018-08-19 19:37:36 -04:00
parent 0411153832
commit e97c432a64
5 changed files with 69 additions and 17 deletions

View File

@ -10,14 +10,11 @@ let paragraph = new docx.Paragraph("No border!");
doc.addParagraph(paragraph);
let borderParagraph = new docx.Paragraph("I have a border on all but one side!");
console.log(borderParagraph.Borders);
let borderParagraph = new docx.Paragraph("I have borders on my top and bottom sides!").createBorder();
borderParagraph.Borders.addTopBorder();
borderParagraph.Borders.addBottomBorder();
borderParagraph.Borders.addLeftBorder();
console.log(borderParagraph.Borders);
doc.addParagraph(borderParagraph);
let exporter = new docx.LocalPacker(doc);
exporter.packPdf('My Document');
exporter.pack('My Document');