Back to Blog

    Developer Blog

    Set font color of new text

    Foxit Quick PDF Library

    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.