Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jspdf text align center

const doc = new jsPDF();
doc.text(100, 20, 'Hello World', 'center');
// Default is 'left', so either use 'center' or 'right'
// You will need to use an increased left-offset
// Documentation says you need to add an argument for the text angle before the alignment, but it works regardless
Source by mrrio.github.io #
 
PREVIOUS NEXT
Tagged: #jspdf #text #align #center
ADD COMMENT
Topic
Name
9+4 =