Question

  1. Is it technically possible to use two different font in the same DrawHTMLTextBox while using Debenu Quick PDF Library 10?

  2. Is it possible with any other libraries which can be used in a PHP project (Not preferred)?

Was it helpful?

Solution

Currently it is not possible to use two different fonts in the string that you pass to the DrawHTMLTextBox function in Debenu Quick PDF Library. If you want to use a different font for different parts of the string you'll need to use DrawHTMLText instead and change the font using SetHTMLNormalFont prior to each section of the string being drawn.

Using this method you'll need to keep track of the width and height of the text you're drawing yourself but you can do that using the GetHTMLTextHeight, GetHTMLTextWidth and GetHTMLTextLineCount.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top