addOverlayText

Add an overlay text item.
addOverlayText([in] BSTR text, [in] BSTR gdiFontName, [in] VARIANT_BOOL gdiBold, [in] VARIANT_BOOL gdiItalic, [in] BSTR psFontName, [in] OLE_COLOR color, [in] int size, [in] double x, [in] double y, [in] int angle, [in] LONG flags)
This function adds a text overlay item. There can be multiple overlays, and they will all be printed on each page.

The arguments are:

When printing to a non-PostScript printer, the gdiFontName, gdiBold, and gdiItalic arguments will be used. When printing to a PostScript printer, the psFontName argument will be used. Some common fonts are:
gdiFontName gdiBold gdiItalic psFontName
"Times New Roman" false false "Times-Roman"
"Times New Roman" false true "Times-Italic"
"Times New Roman" true false "Times-Bold"
"Times New Roman" true true "Times-BoldItalic"
"Arial" false false "Helvetica"
"Arial" false true "Helvetica-Oblique"
"Arial" true false "Helvetica-Bold"
"Arial" true true "Helvetica-BoldOblique"
"Courier New" false false "Courier"
"Courier New" false true "Courier-Oblique"
"Courier New" true false "Courier-Bold"
"Courier New" true true "Courier-BoldOblique"

You can add any number of text overlays: just call the addOverlayText function multiple times (before calling printPDF4).

To clear all of the current overlays (e.g., before printing a different set of pages from the document), use the clearOverlayText function.

VB:
pdf.addOverlayText("CONFIDENTIAL", "Arial", 1, 0, "Helvetica-Bold", _ RGB(0, 0, 0), 10, 200, 50, 0, 0)
clearOverlayText
overlayUnder
gdiOverlay