Universal Document Converter
Informazioni sul prodotto
Scarica
Acquista
Tutorial
Soluzioni per sviluppatori
Servizio di assistenza
Chi è fCoder SIA


      Cerca nel sito
   


      Conversioni più richieste
Da Adobe PDF a JPEG
Da documento Word a PDF
Da foglio di lavoro Excel a PDF
Da PowerPoint a JPEG
Da disegno Visio a PDF
Da disegno AutoCAD a TIFF
Da pagina Web a JPEG
Convertire di lavoro Excel in PDF
Convertire da DjVu in PDF
Pagine Web in PDF



Pagina principale>Developer Solutions>Interfaces>IUDC>IUDCPrinter>IProfile>IWatermark>ITextWatermark

ITextWatermark


The ITextWatermark interface is used to configure the application of text watermarks to output file pages.

Properties

Integer BackgroundColor

Defines watermark background color (as an RGB value). It is both readable and writable.

Integer BackgroundTransparency
Defines watermark background transparency (as a percentage value). Valid range: between 0 and 100. It is both readable and writable.

Enum EmbossingMethod
Defines the method of applying a watermark to document pages. It is both readable and writable.
ConstantValueDescription
WME_STAMP0Watermark is applied over the document
WME_WATERMARK2Watermark is "mixed" in with the document
WME_BACKGROUND3Watermark is placed underneath the document

Boolean FontBold
Is a flag indicating whether the watermark font should be bold. It is both readable and writable.
ValueDescription
TRUEWatermark font is highlighted in bold
FALSEWatermark font is not highlighted in bold

Integer FontColor
Defines watermark font color (as an RGB value). It is both readable and writable.

Boolean FontItalic
Is a flag indicating whether the watermark font should be italic. It is both readable and writable.
ValueDescription
TRUEWatermark font is in italics
FALSEWatermark font is not italicized.

String FontName
Defines the name of the font to be used to apply the watermark. The font should be installed on the system. It is both readable and writable.

Integer FontSize
Determines watermark font size. It is both readable and writable.

Integer FontTransparency
Defines watermark font transparency (as a percentage value). Valid range: between 0 and 100. It is both readable and writable.

Boolean FontUnderline
Is a flag indicating whether the watermark should be underlined. It is both readable and writable.
ValueDescription
TRUEWatermark font is underlined
FALSEWatermark font is not underlined.

Integer MarginsX
Defines watermark horizontal margins, i. e. offsets (in pixels) from the right and left edges of the page to be taken into account when placing the watermark. It is both readable and writable.

Integer MarginsY
Defines watermark vertical margins, i. e. offsets (in pixels) from the top and bottom edges of the page to be taken into account when placing the watermark. It is both readable and writable.

Enum PositionX
Defines watermark horizontal alignment on the pages of a document. It is both readable and writable.
ConstantValueDescription
POS_LEFT0xFFFFFFFFWatermark is left-justified on page
POS_CENTER0Watermark is centered on page
POS_RIGHT1Watermark is right-justified on page

Enum PositionY
Defines watermark vertical alignment on the pages of a document. It is both readable and writable.
ConstantValueDescription
POS_TOP0xFFFFFFFFWatermark is aligned with the top of the page
POS_CENTER0Watermark is vertically centered on page
POS_BOTTOM1Watermark is aligned with the bottom of the page

Enum Rotation
Defines watermark rotation angle on a page. It is both readable and writable.
ValueDescription
-90Watermark is rotated 90 degrees counterclockwise
-45Watermark is rotated 45 degrees counterclockwise
0Watermark is not rotated.
45Watermark is rotated 45 degrees clockwise
90Watermark is rotated 90 degrees clockwise

Boolean Stretch
Defines whether a watermark will be stretched to cover the entire page in a document. It is both readable and writable.
ValueDescription
TRUEWatermark will be stretched to cover entire page
FALSEWatermark will not be stretched

String Text
Contains the text which will be applied to output file pages as a watermark. It is both readable and writable.
The following macros may be used:
MacroDescriptionExample Value
&[DocName(0)]Document NameMy Document
&[DocName(1)]Uppercase Document NameMY DOCUMENT
&[DocName(2)]Lowercase Document Namemy document
&[Page(0)]Page Number3
&[Page(2)]
. . .
&[Page(6)]
Page number of between 2 and 6 digits05

000005
&[Year(0)]Current 4-digit year2009
&[Year(1)]Current 2-digit year09
&[Month(0)]Current month as textFebruary
&[Month(1)]Current month as 2-digit number02
&[Month(2)]Current month as Roman numeralsII
&[MonthDay(0)]Current date3
&[MonthDay(1)]Current 2-digit date03
&[WeekDay(0)]Current day of week as textTuesday
&[WeekDay(1)]Current day of week as number3
&[WeekDay(2)]Current day of week as 2-digit number03
&[Date(0)]Current full dateTuesday, February 03, 2009
&[Date(1)]Current full date as dd.mm.yyyy03.02.2009
&[Date(2)]Current complete date as dd.mm.yy03.02.09
&[Hour(0)]Current hour in 24-hour format21
&[Hour(1)]Current hour in 12-hour format09
&[Hour(2)]am or pmam
&[Min(0)]Current minutes31
&[Sec(0)]Current seconds38
&[Time(0)]Current time in hh-mm-ss format09-31-38
&[Time(1)]Current time in hh-mm (24-Hour) format21-31
&[Time(2)]Current time in hh-mm (12-Hour) format09-31

Boolean TextBorder
Defines whether the watermark text will be placed in a rectangular box. It is both readable and writable.
ValueDescription
TRUEWatermark text will have a border
FALSEWatermark text will have no border

Examples

Visual Basic 6

Dim objUDC As IUDC Dim itfPrinter As IUDCPrinter Dim itfProfile As IProfile Set objUDC = New UDC.APIWrapper Set itfPrinter = objUDC.Printers("Universal Document Converter") Set itfProfile = itfPrinter.Profile itfProfile.Watermark.Mode = WM_TEXT itfProfile.Watermark.TextWatermark.BackgroundColor = RGB(0, 255, 0) itfProfile.Watermark.TextWatermark.BackgroundTransparency = 50 itfProfile.Watermark.TextWatermark.EmbossingMethod = WME_STAMP itfProfile.Watermark.TextWatermark.FontBold = True itfProfile.Watermark.TextWatermark.FontColor = RGB(255, 0, 0) itfProfile.Watermark.TextWatermark.FontItalic = True itfProfile.Watermark.TextWatermark.FontName = "Arial" itfProfile.Watermark.TextWatermark.FontSize = 72 itfProfile.Watermark.TextWatermark.FontTransparency = 50 itfProfile.Watermark.TextWatermark.FontUnderline = False itfProfile.Watermark.TextWatermark.MarginsX = 10 itfProfile.Watermark.TextWatermark.MarginsY = 10 itfProfile.Watermark.TextWatermark.PositionX = POS_CENTER itfProfile.Watermark.TextWatermark.PositionY = POS_CENTER itfProfile.Watermark.TextWatermark.Rotation = 45 itfProfile.Watermark.TextWatermark.Stretch = False itfProfile.Watermark.TextWatermark.Text = "Top Secret" itfProfile.Watermark.TextWatermark.TextBorder = True


© fCoder SIA Chi è fCoder SIA | Mappa del sito