Open GoogleCodeExporter opened 9 years ago
I am not able to make text align, could you please provide add the feature to
have alignment for the text.
Original comment by madhu...@motorola.com
on 11 Mar 2015 at 2:35
Hey,
I did this way,
var txtWidth =
doc.getStringUnitWidth(inputString)*fontsize/doc.internal.scaleFactor;
var singleCharWidth = doc.getStringUnitWidth("
")*fontsize/doc.internal.scaleFactor
var marginFromLeft = ((totalWidth - txtWidth)/2);
doc.text(x+marginFromLeft, y, inputString);
Hope this may help you.
Regards
Amit Gajjar
Original comment by gajjar...@gmail.com
on 23 Apr 2015 at 4:44
Original issue reported on code.google.com by
courtney...@gmail.com
on 21 Aug 2013 at 12:42