PDFANNOTATION_Flags_afReadOnly
IPDFDocument3 :: Annotations

See Also Example
Collapse All

This property gets or sets the value indicating if the annotation is read-only.

Syntax

VARIANT_BOOL PDFANNOTATION_Flags_afReadOnly { get; set; }
Value
VARIANT_TRUE if the control is read only, VARIANT_FALSE otherwise.

Remarks

If set to VARIANT_TRUE, do not allow the annotation to interact with the user. The annotation may be displayed or printed (depending on the settings of the NoView and Print flags) but should not respond to mouse clicks or change its appearance in response to mouse motions.

Note: This flag is ignored for widget annotations; its function is subsumed by the ReadOnly flag of the associated form field.

Equivalent in new interface: IPDFDocument4::AnnotReadOnly.

Example

Changing an Annotation's Flags

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetAnnotation(100, 200, 110, 210, 'Title',
    'Here goes annotation contents...', 255, false, false, false,
    false, false, false, false, false, charsetANSI_CHARSET);
PDF.PDFANNOTATION_Flags_afReadOnly := true;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_SetAnnotation(100, 200, 110, 210, "Title",
    "Here goes annotation contents...", 255, FALSE, FALSE, FALSE,
    FALSE, FALSE, FALSE, FALSE, FALSE, charsetANSI_CHARSET);
PDF->PDFANNOTATION_Flags_afReadOnly = TRUE;
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_SetAnnotation(100, 200, 110, 210, "Title",
    "Here goes annotation contents...", 255, false, false, false,
    false, false, false, false, false, TxFontCharset.charsetANSI_CHARSET);
PDF.PDFANNOTATION_Flags_afReadOnly = true;
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_SetAnnotation 100, 200, 110, 210, "Title",_
    "Here goes annotation contents...", 255,_
    false, false, false, false, false, false, false, false, 0
PDF.PDFANNOTATION_Flags_afReadOnly = True
PDF.EndDoc

See Also

Reference