Class Screen
A screen annotation (PDF 1.5) specifies a region of a page upon which media clips may be played. It also serves as an object from which actions can be triggered. 12.6.4.13, 'Rendition Actions' discusses the relationship between screen annotations and rendition actions.
Implements
Inherited Members
Namespace: pdftron.PDF.Annots
Assembly: PDFNet.dll
Syntax
public class Screen : Annot, IDisposable
Constructors
Screen(Annot)
Creates a Screen annotation and initialize it using given annotation object.
Declaration
public Screen(Annot ann)
Parameters
Type | Name | Description |
---|---|---|
Annot | ann | the annot |
Remarks
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Screen(Obj)
Creates a Screen annotation and initialize it using given Cos/SDF object.
Declaration
public Screen(Obj d)
Parameters
Type | Name | Description |
---|---|---|
Obj | d | the d |
Remarks
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Methods
Create(SDFDoc, Rect)
Creates a new Screen annotation, in the specified document.
Declaration
public static Screen Create(SDFDoc doc, Rect pos)
Parameters
Type | Name | Description |
---|---|---|
SDFDoc | doc | A document to which the annotation is added. |
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
Returns
Type | Description |
---|---|
Screen | A newly created blank Screen annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Dispose(bool)
Declaration
[HandleProcessCorruptedStateExceptions]
protected override void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
bool | A_0 |
Overrides
GetAction()
Sets the action of the Screen annotation (Optional; PDF'1.1 )
Declaration
public Action GetAction()
Returns
Type | Description |
---|---|
Action | action of the screen annotation |
Remarks
The action is an action that shall be performed when the annotation is activated
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetBackgroundColor()
Gets the background color of the Screen annotation.
Declaration
public ColorPt GetBackgroundColor()
Returns
Type | Description |
---|---|
ColorPt | A ColorPt object that denotes the color of the Screen background. |
Remarks
that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetBackgroundColorCompNum" to access the color space information corresponding to the border color.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetBackgroundColorCompNum()
Gets the number indicating background color space of the Screen annotation.
Declaration
public int GetBackgroundColorCompNum()
Returns
Type | Description |
---|---|
int | An integer indicating a color space value from the ColorSpace::Type enum. That is, 1 corresponding to "e_device_gray", 3 corresponding to "e_device_rgb", and 4 corresponding to "e_device_cmyk" if color space is applicable, orelse 0 corresponding to "e_null" if the color is transparent. |
Remarks
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetBorderColor()
Gets the border color of the Screen annotation.
Declaration
public ColorPt GetBorderColor()
Returns
Type | Description |
---|---|
ColorPt | A ColorPt object that denotes the color of the Screen border. |
Remarks
that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetBorderColorCompNum" to access the color space information corresponding to the border color. This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetBorderColorCompNum()
Gets the number indicating border color space of the Screen annotation.
Declaration
public int GetBorderColorCompNum()
Returns
Type | Description |
---|---|
int | An integer indicating a color space value from the ColorSpace::Type enum. That is, 1 corresponding to "e_device_gray", 3 corresponding to "e_device_rgb", and 4 corresponding to "e_device_cmyk" if color space is applicable, orelse 0 corresponding to "e_null" if the color is transparent. |
Remarks
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetFitFull()
Gets the fit full option being used.
Declaration
public bool GetFitFull()
Returns
Type | Description |
---|---|
bool | A boolean value indicating the fit full option being used. |
Remarks
the FitFull value, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetHIconLeftOver()
Gets the horizontal leftover of the icon within the annotatin.
Declaration
public double GetHIconLeftOver()
Returns
Type | Description |
---|---|
double | A number indicating the horizontal leftover of the icon within the annotation. |
Remarks
the horizontal leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetIconCaptionRelation()
Gets the Icon and caption relationship of the Screen annotation.
Declaration
public Screen.IconCaptionRelation GetIconCaptionRelation()
Returns
Type | Description |
---|---|
Screen.IconCaptionRelation | An entry of the "IconCaptionRelation" enum which represents the relationship between the icon and the caption of the Screen annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetMouseDownCaptionText()
Gets the button down caption text of the Screen annotation.
Declaration
public string GetMouseDownCaptionText()
Returns
Type | Description |
---|---|
string | A string containing the button down text of the Screen annotation. |
Remarks
The button down caption shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetMouseDownIcon()
Gets the Mouse Down icon associated with the Screen annotation.
Declaration
public Obj GetMouseDownIcon()
Returns
Type | Description |
---|---|
Obj | An SDF object that represents the Mouse Down icon associated with the Screen annotation. |
Remarks
The Mouse Down icon object is a form XObject defining the widget annotation's alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetRolloverCaptionText()
Gets the roll over caption text of the Screen annotation.
Declaration
public string GetRolloverCaptionText()
Returns
Type | Description |
---|---|
string | A string containing the static caption text of the Screen annotation. |
Remarks
The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetRolloverIcon()
Gets the rollover icon associated with the Screen annotation.
Declaration
public Obj GetRolloverIcon()
Returns
Type | Description |
---|---|
Obj | An SDF object that represents the rollover icon associated with the Screen annotation. |
Remarks
The rollover icon object is a form XObject defining the widget annotation's rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetScaleCondition()
Gets the condition under which the icon should be scaled.
Declaration
public Screen.ScaleCondition GetScaleCondition()
Returns
Type | Description |
---|---|
Screen.ScaleCondition | an entry of the "ScaleCondition" enum which the icon should be scaled. |
Remarks
This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button's icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation's icons (normal, rollover, and alternate).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetScaleType()
Gets the Scale Type of the Screen annotation.
Declaration
public Screen.ScaleType GetScaleType()
Returns
Type | Description |
---|---|
Screen.ScaleType | An entry of the |
Remarks
This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button's icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation's icons (normal, rollover, and alternate).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetStaticCaptionText()
Gets static caption text of the Screen annotation.
Declaration
public string GetStaticCaptionText()
Returns
Type | Description |
---|---|
string | A string containing the static caption text of the Screen annotation. |
Remarks
The static caption is the widget annotation's normal caption, which shall be displayed when it is not interacting with the user. Unlike the remaining entries with the captions, which apply only to widget annotations associated with pushbutton fields, the Static Caption(CA) entry may be used with any type of button field, including check boxes.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetStaticIcon()
Gets the static icon associated with the Screen annotation.
Declaration
public Obj GetStaticIcon()
Returns
Type | Description |
---|---|
Obj | An SDF object that represents the static icon associated with the Screen annotation. |
Remarks
The static icon object is a form XObject defining the widget annotation's normal icon, which shall be displayed when it is not interacting with the user.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetTitle()
Gets the title of the Screen Annotation.
Declaration
public string GetTitle()
Returns
Type | Description |
---|---|
string | A string representing the title of the Screen Annotation |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetVIconLeftOver()
Gets the vertical leftover of the icon within the annotatin.
Declaration
public double GetVIconLeftOver()
Returns
Type | Description |
---|---|
double | a number indicating the vertical leftover of the icon within the annotation. |
Remarks
the vertical leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetAction(Action)
Sets the action of the Screen annotation (Optional; PDF'1.1 )
Declaration
public void SetAction(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | An action object representing the action of the Screen annotation. |
Remarks
The action is an action that shall be performed when the annotation is activated
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetBackgroundColor(ColorPt, int)
Sets the background color of the Screen. (Optional)
Declaration
public void SetBackgroundColor(ColorPt c, int CompNum)
Parameters
Type | Name | Description |
---|---|---|
ColorPt | c | A ColorPt object that denotes the color of the wdget background. |
int | CompNum | An int whose value implies the color space used for the parameter c. |
Remarks
it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace::Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetBorderColor(ColorPt, int)
Sets the border color of the Screen. (Optional)
Declaration
public void SetBorderColor(ColorPt c, int CompNum)
Parameters
Type | Name | Description |
---|---|---|
ColorPt | c | A ColorPt object that denotes the color of the wdget border. |
int | CompNum | An int whose value implies the color space used for the parameter c. |
Remarks
it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace::Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetFitFull(bool)
Sets the fit full option being used. (Optional)
Declaration
public void SetFitFull(bool ff)
Parameters
Type | Name | Description |
---|---|---|
bool | ff | A boolean value indicating the fit full option being used. |
Remarks
the FitFull value, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetHIconLeftOver(double)
Sets the horizontal leftover of the icon within the annotatin. (Optional)
Declaration
public void SetHIconLeftOver(double hl)
Parameters
Type | Name | Description |
---|---|---|
double | hl | A number indicating the horizontal leftover of the icon within the annotation. |
Remarks
the horizontal leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetIconCaptionRelation(IconCaptionRelation)
Sets the Icon and caption relationship of the Screen annotation. (Optional; pushbutton fields only)
Declaration
public void SetIconCaptionRelation(Screen.IconCaptionRelation icr)
Parameters
Type | Name | Description |
---|---|---|
Screen.IconCaptionRelation | icr | An entry of the "IconCaptionRelation" enum which represents the relationship between the icon and the caption of the Screen annotation. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetMouseDownCaptionText(string)
Sets the button down caption text of the Screen annotation. (Optional; button fields only)
Declaration
public void SetMouseDownCaptionText(string ct)
Parameters
Type | Name | Description |
---|---|---|
string | ct | A string containing the button down text of the Screen annotation. |
Remarks
The button down caption shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetMouseDownIcon(Obj)
Sets the Mouse Down icon associated with the Screen annotation. (Optional; button fields only) Sets the Mouse Down icon associated with the Screen annotation.
Declaration
public void SetMouseDownIcon(Obj ic)
Parameters
Type | Name | Description |
---|---|---|
Obj | ic | An SDF object that represents the Mouse Down icon associated with the Screen annotation. |
Remarks
The Mouse Down icon object is a form XObject defining the widget annotation's alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetRolloverCaptionText(string)
Sets the roll over caption text of the Screen annotation. (Optional; button fields only)
Declaration
public void SetRolloverCaptionText(string ct)
Parameters
Type | Name | Description |
---|---|---|
string | ct | A string containing the roll over caption text of the Screen annotation. |
Remarks
The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetRolloverIcon(Obj)
Sets the rollover icon associated with the Screen annotation. (Optional; button fields only)
Declaration
public void SetRolloverIcon(Obj ic)
Parameters
Type | Name | Description |
---|---|---|
Obj | ic | An SDF object that represents the rollover icon associated with the Screen annotation. |
Remarks
The rollover icon object is a form XObject defining the widget annotation's rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetScaleCondition(ScaleCondition)
Sets the condition under which the icon should be scaled.
Declaration
public void SetScaleCondition(Screen.ScaleCondition sd)
Parameters
Type | Name | Description |
---|---|---|
Screen.ScaleCondition | sd | an entry of the "ScaleCondition" enumerator which the icon should be scaled. |
SetScaleType(ScaleType)
Sets the Scale Type of the Screen annotation. (Optional)
Declaration
public void SetScaleType(Screen.ScaleType st)
Parameters
Type | Name | Description |
---|---|---|
Screen.ScaleType | st |
|
Remarks
This property is part of the Icon Fit dictionary, where the Icon Fit dictionary specifys how to display the button's icon within the annotation rectangle of its widget annotation(Optional; pushbutton fields only) If present, the icon fit dictionary shall apply to all of the annotation's icons (normal, rollover, and alternate).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetStaticCaptionText(string)
Sets static caption text of the Screen annotation. (Optional; button fields only)
Declaration
public void SetStaticCaptionText(string ct)
Parameters
Type | Name | Description |
---|---|---|
string | ct | A string containing the static caption text of the Screen annotation. |
Remarks
The static caption is the widget annotation's normal caption, which shall be displayed when it is not interacting with the user. Unlike entries "RC, AC, I, RI, IX, IF, TP", which apply only to widget annotations associated with pushbutton fields, the Static Caption(CA) entry may be used with any type of button field, including check boxes.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetStaticIcon(Obj)
Sets the static icon associated with the Screen annotation. (Optional; button fields only)
Declaration
public void SetStaticIcon(Obj ic)
Parameters
Type | Name | Description |
---|---|---|
Obj | ic | An SDF object that represents the static icon associated with the Screen annotation. |
Remarks
The static icon object is a form XObject defining the widget annotation's normal icon, which shall be displayed when it is not interacting with the user.
This property is part of the Screen appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetTitle(string)
Sets the title of the Screen Annotation. (Optional)
Declaration
public void SetTitle(string title)
Parameters
Type | Name | Description |
---|---|---|
string | title | A string representing the title of the Screen Annotation |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
SetVIconLeftOver(double)
Sets the vertical leftover of the icon within the annotatin. (Optional)
Declaration
public void SetVIconLeftOver(double vl)
Parameters
Type | Name | Description |
---|---|---|
double | vl | A number indicating the vertical leftover of the icon within the annotation. |
Remarks
the vertical leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |