44
activePDF Toolkit Professional Edition
aptkl4a 30405
Copyright 2005, activePDF, Inc. All Rights Reserved.
Page 85 of 553
ForceColorReset
Description
Resets the color scheme the output PDF to black.
Return type
None
Syntax
object.
ForceColorReset
PageNr
The ForceColorReset method has this part:
Part
Value Type
Description
Object
An expression of the Toolkit object.
PageNr
Long
Optional.
0=The action will take place on the new or current open output
page. (Default)
>1 = The action will occur on the specified page number.
-1 = The action will occur on all pages.
Remarks
Some PDF documents do not initialize their colors properly and assume that the default color black is
available. If you set the text of the color to be printed using SetTextColor,the rest of the text on the
following merged pages may be in that color. Call this method to reset the colors to black after the
text item.
Example
'ForceColorReset Example
Set TK = CreateObject("APToolkit.Object")
r = TK.OpenOutputFile("ForceColorReset.pdf")
'Set the font and color for the text
TK.SetFont "Helvetica", 20, 0
TK.SetTextColor 50, 100, 255, 0, 0
'Stamp text onto the page
TK.PrintText 30, 740, "Hello World", 0
'Reset the color for next PrintText
TK.ForceColorReset 0
'Stamp second text onto the page
TK.PrintText 30, 700, "Hello World", 0