BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

StampTransparentColor Property

Gets/Sets stamp transparent color.

Property StampTransparentColor(Index As Long) As OLE_COLOR

System.UInt32 get_StampTransparentColor(int Index)
void set_StampTransparentColor(int Index, System.UInt32 value)

int getStampTransparentColor(int Index) throws PrinterException
void setStampTransparentColor(int Index, int value) throws PrinterException

Type

OLE_COLOR

Parameters

Remarks

If the image is a BMP file with 256 colors or less, the color specified in this property will become transparent color.

Note 1: In order for transparency to work there must be only one entry with this color in the image color palette.

Note 2: OLE_COLOR conversion from various programming languages:

For more information about color translation, refer to MSDN Knowledge Base article Q131101.

Example Usage

Set oPrinter = CreateObject("easyPDF.Printer.8")
Set oPrintJob = oPrinter.PrintJob
Set oPDFSetting = oPrintJob.PDFSetting

oPDFSetting.Stamp(0) = True
oPDFSetting.StampFileName(0) = "C:\test\stamp.bmp"
oPDFSetting.StampZOrder(0) = PRN_STAMP_ZORDER_TOP

oPDFSetting.StampHPosition(0) = PRN_STAMP_HPOS_LEFT
oPDFSetting.StampVPosition(0) = PRN_STAMP_VPOS_TOP
oPDFSetting.StampHOffset(0) = 0.5
oPDFSetting.StampVOffset(0) = 0.5
oPDFSetting.StampTransparentColor(0) = RGB(0, 128, 128)
oPDFSetting.StampZoom(0) = 70

oPrintJob.PrintOut "C:\test\input.doc", "C:\test\output.pdf"

C++:

static_cast<OLE_COLOR>(RGB(0, 0, 255))

VB6:

RGB(0, 0, 255)

VB.NET:

Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(Color.FromArgb(0, 0, 255))

C#:

(uint)System.Drawing.ColorTranslator.ToOle(Color.FromArgb(0, 0, 255))

Others:

red + green * 256 + blue * 65536 (32 bit integer value in following format: 0x00bbggrr)