User Contributed Notes 3 notes

One thing I came across, and hope is useful to someone, is the following.If you're looking to use the pdf_stringwidth() function, and expecting it to give you the proper results when trying to center or position the text, try to avoid using this line in your code:

<? pdf_set_parameter($pdf, "textformat", "utf8");?>

I discovered (after much hair-pulling of what remains of my hair) that this line of code increases the amount of space between characters by roughly 100%. Removing this line of code made the text on my generated PDF's significantly tighter and more appealing.