Foxit Quick PDF Library

Set font color of new text

The SetTextColor function can be used to set the color of text drawn using the DrawText function.

// Set text color to red.
QP.SetTextColor(255, 0, 0);
QP.DrawText(50, 50, "Red colored text");

Foxit Quick PDF Library can only control the color of text that is being drawn using the DrawText function. It cannot change the color of text that already exists in the PDF file.

This article refers to a deprecated product. If you are looking for support for Foxit PDF SDK, please click here.

Updated on May 16, 2022

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: