File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,11 @@ declare namespace PDFKit.Mixins {
439439 data : Array < Array < string | CellOptions > > ;
440440 }
441441
442+ interface ExpandedAlign {
443+ x ?: "left" | "center" | "right" | "justify" ;
444+ y ?: "top" | "center" | "bottom" ;
445+ }
446+
442447 interface CellOptions extends CellStyle {
443448 /** The value, will be cast to a string (null and undefined are not rendered but the cell is still outlined) */
444449 text ?: string | undefined | null ;
@@ -451,7 +456,7 @@ declare namespace PDFKit.Mixins {
451456 /** Font options for the cell */
452457 font ?: any ;
453458 /** The alignment of the cell text (default {x: 'left', y: 'top'}) */
454- align ?: { x ?: "right " | "left" ; y ?: "top" | "bottom" } ;
459+ align ?: "center " | ExpandedAlign ;
455460 /** The text stroke (default 0) */
456461 textStroke ?: number | boolean ;
457462 /** Sets the text stroke color of the cells text (default black) */
Original file line number Diff line number Diff line change 11{
22 "private" : true ,
33 "name" : " @types/pdfkit" ,
4- "version" : " 0.14 .9999" ,
4+ "version" : " 0.17 .9999" ,
55 "projects" : [
66 " http://pdfkit.org"
77 ],
Original file line number Diff line number Diff line change @@ -436,6 +436,17 @@ doc.text("before")
436436 } )
437437 . text ( "after" ) ;
438438
439+ doc . table ( {
440+ data : [
441+ [
442+ {
443+ align : { x : "center" , y : "bottom" } ,
444+ text : "test" ,
445+ } ,
446+ ] ,
447+ ] ,
448+ } ) ;
449+
439450doc . text ( "Scale" , { align : "justify" } ) ;
440451
441452doc . text ( "Baseline - string literal" , { baseline : "alphabetic" } ) ;
You can’t perform that action at this time.
0 commit comments