Created
September 25, 2013 10:16
-
-
Save emulsion-io/6697707 to your computer and use it in GitHub Desktop.
Alignement à droite avec JSPDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function taille(string, doc) | |
{ | |
var debut_zone = 145; | |
var largeur_zone = 25; | |
var font_size = 10; | |
var t = doc.getStringUnitWidth(string); | |
var result = debut_zone + (largeur_zone - (t * font_size / ( 72 / 25.6 ))); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment