Change Question Title Colors

Edit in →

This demo example shows how to change the color of question titles in a generated PDF form. This feature is especially useful for quiz and test results—you can visually indicate correctly and incorrectly answered questions using color. To generate a PDF form with applied customizations, answer the quiz questions and click the "Save as PDF" button.

To implement title customization, you first need to understand the structure of a PDF document. Each element in a PDF form consists of PDF bricks—small building blocks that specify what and where to render on a PDF page. To customize question titles, you need to modify their PDF bricks within the onRenderQuestion event. Its options.bricks parameter provides access to an array of bricks that correspond to an individual form field. Log this parameter to the browser's console or set a debugger within the event handler and examine the bricks array to identify the brick you need to customize. Refer to the code listing for more information.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.