This class represents the appearance of the border drawn for PDF annotations.
Defines a problem that could occur with the a BaseAnnotation property value.
Pdf annotations support appearances that can be associated with three interaction modes NormalHow the annotation will appear under typical circumstances (ie, no interaction)RolloverHow the annotation will appear when the cursor is in the annotationActivatedHow the annotation will appear when click on Each of this modes is associated with a collection of appearances, each of which corresponds to an annotation's current state. For example, a CheckboxWidgetAnnotation defines states for when it has been checked and when it is clear. The Normal property would contain appearances for each of these states. When an annotation only has one state, the name of that state is inconsequetial and will be ignored when written to the PDF file. For naming purposes, if an annotation has only a single state with no meaningful name, you can use DefaultAppearanceName for the name.
Represents a base class for all PDF annotation types.
BaseMarkupAnnotation is an abstract class that represents the common features of PDF annotations that are used for document mark-up.
The BorderEffect object represents a way to modify the basic appearance of some PDF annotations, including RectangleAnnotation, EllipseAnnotation, PolygonAnnotation and TextBoxAnnotation. Support for all but TextBoxAnnotation began with PDF 1.5. Support for TextBoxAnnotation began in PDF 1.6. BorderEffect consists of a BorderEffectKind and an intensity setting. Intensity only currently applies to Cloudy.
The BorderStyle object represents a border than may surround an annotation including border width, style and dash pattern.
A callout line is a line that runs from a CalloutAnnotation to another point on the page. CalloutLine is abstract with concrete implementations that represent a two-point line and a three-point line.
The CheckboxWidgetAnnotation is a button type widget that allows the user to select between one of two possible values. By convention, these values are "Yes" and "Off". Unlike most annotations, CheckBoxWidgetAnnotations needs to have a suite of DrawingTemplate resources associated with it. At a minimum, there needs to be a "Yes" and "Off" entries in the Normal appearance set.
This is how to set up a set of default appearances for a checkbox:
"normalChecked" and "normalCleared" are strings that should be the name of PdfTemplateResource objects in your document's resource collection.
checkbox.Appearance.Normal.Add(CheckboxWidgetAnnotation.CheckedValue, "normalChecked"); checkbox.Appearance.Normal.Add(CheckboxWidgetAnnotation.ClearedValue, "normalCleared");
In a ChoiceWidgetAnnotation, it is possible to have either a list of choices which will be used both for display and for exporting data, or a list of pairs where one element is used for display and the other element is used for exporting data. For example, you might create a survey where a ChoiceWidgetAnnotation displays "Best - Would Purchase Again", "Good - Satisfactory", "Poor - Would Not Purchase Again". These are wordy and might not be suitable for a data consumer, so you could instead associate export names with each choice: "Best", "Good", "Poor". You could also create surveys for other languages by putting the target language in the display name and a language neutral name in the export name.
This is a class that is used for defining and installing PdfTemplateResource objects in a resource dictionary that represent the appearances for widget annotations. At present this class is responsible for making appearances for checkbox and radio button widgets, as these appearances can be shared across an entire document. Before working with a new document, you can set the basic color schemes used for the appearances. In addition, you can force installation of your own default appearances and they will be treated as standard.
Represents an ellipse (or circle) annotation. This annotation is identical in every way to the RectangleAnnotation except for the appearance.
GeneralReview represents a review process with states None, Accepted, Rejected, Cancelled, and Completed.
An InkAnnotation represents a series of free-hand marks. They are modeled by a set of polylines grouped as one. These could be used for a signature or document mark up.
The LineAnnotation represents a single line on the page
A MarkingReview represents a review process with two states: Marked and Unmarked.
PdfAnnotationList is a collection of annotations for a PDF page,
The PolygonAnnotation represents a filled polygon on the page.
The PolylineAnnotation represents an unfilled polygon.
The PopupAnnotation represents an annotation that can be shown or hidden and offers more information about another annotation. Popup annotations never appear singly. They are always associated with an existing annotation via its Popup property and also by setting the ParentAnnotation property to the BaseMarkupAnnotation. When the ParentAnnotation is a BaseMarkupAnnotation, the PopupAnnotation will project properties of the BaseMarkupAnnotation.
The RadioButtonWidgetAnnotation represents a possible selection in a set of choices. Typically, the act of selecting a radio button annotation will have the side effect of de-selecting one or more others. As a result, a single RadioButtonWidgetAnnotation is not particularly useful on its own. Grouping is managed by making each button in the group be a child of a RadioButtonFormField. This is done by creating a RadioButtonWidgetAnnotation for each button, giving each a unique "on value", setting each in the ChildFields collection of the parent field and putting the annotations into a page. It is far easier to use MakeRadioSet(GlobalResources, PdfGeneratedPage, String, String, String, String, PdfBounds) which will construct the parent field and all the radio buttons and wire them up correctly. If you use the standard appearances, the radio button's appearance will not have any text associated with it. It will instead just be the button itself. It is the responsibility of the client code to provide labels.
A RectangleAnnotation represents a rectangle drawn on the page.
The RedactionProposalAnnotation is a BaseMarkupAnnotation that is used to mark areas within a document that are proposed for redaction. The creation of this annotation on a page does not remove any content below it. That is left strictly to the PDF viewer and may or may not be supported. This particular annotation was only supported beginning with PDF version 1.7 and should be used with care. When a compliant viewer performs redaction based on one or more RedactionProposalAnnotation objects, it is instructed to remove all content under the area or areas specified and will remove the annotation but insert new content in its place. This content depends on the specification of the annotation. If the annotation does not specify any quadrilaterals in the Regions property, the area will be a rectangle specified by Bounds that is filled with the RedactionInteriorColor or black if none has been specified. If there are Regions specified, they will be used instead of Bounds. If OverlayText is specified, this text will be overlayed on top of the redacted area. If IsOverlayTextRepeated is true, then the text will be laid down in a repeating pattern. If RedactionTemplate is set, this template will be used for the redaction instead of all of the previous elements.
A RubberStampAnnotation represents a canned set of markings for a document that appear as if the document had been stamped.
A SignatureWidgetAnnotation represents an area on a page that can be signed by the recipient of a document.
The SoundAnnotation is used to provide a voice or other sound mark-up in a document. The annotation appears on the page as either a speaker or a microphone using the standard appearance. SoundAnnotation objects contain a Sound object which represents the sound that will be played. In most PDF viewers, sound annotations can only be triggered to play by direct user interaction. If you need a Sound to be played by some other trigger, consider using a PdfSoundAction
A StickyNoteAnnotation is meant to represent a sticky note on the page. In interaction, the note is either closed or open. When closed, it appears as a small piece of paper attached to the page. When open, it provides a simple user interface to view and edit text associated with it. In the initial versions of PDF, this annotation was represented on its own and because of the nature of the UI, was very complicated. In later revisions, it was changed to be two annotations: a StickyNoteAnnotation which holds the text and a PopupAnnotation which represents the UI for editing the text. This is now the preferred form and there is a convenience constructor that will make an associated PopupAnnotation and attach it to the StickyNoteAnnotation.
This shows how to use the convenience constructor for making a PopupAnnotation.
StickyNoteAnnotation annot = new StickyNoteAnnotation(new PdfBounds(72, 400, 36, 72), "empty.", new PdfBounds(72, 400, 144, 288)); // this is equivalent to: StickyNoteAnnotation annot = new StickyNoteAnnotation(new PdfBounds(72, 400, 36, 72) "empty."); annot.Popup = new PopupAnnotation(new PdfBounds(72, 400, 144, 288), annot);
A TextMarkupAnnotation is an annotation type that is used to represent various similar ways of marking editing changes to text on a page. Typically, this type of annotation is built by using the set of quadrilaterals that bound individual words or word parts on a page and then providing marks on top of the text including underlines, highlights, an insertion caret, strike out, or squiggly underline.
A TextWidgetAnnotation is used to provide a user-fillable text field on a form in a document. Note that the act of putting a widget annotation of a page is not enough to mark it as a form field. The annotation must also be put into the Fields collection of the document's Form property as well.
Creating a typical widget annotation.
TextWidgetAnnotation anno = new TextWidgetAnnotation(bounds, "user", "anonymous"); page.Annotations.Add(anno); doc.Form.Fields.Add(anno);
A ThreePointCalloutLine is a line that contains a "knee" in the middle of the line. This can be used to make a more pleasing call out line such that at least one line segment is rectilinear.
This represents a simple two-point line with a starting point and an ending point.
The TypeWriterAnnotation is nearly identical to the TextBoxAnnotation except that it implies that the Bounds property are fluid to the text that is being entered and that there is usually no background or outline drawn for the bounding region. As such, it is supposed to appear as if the user is typing notes directly onto the page. If the text contains either neline or carriage returns characters ('\n' or '\r', the lines will be split at those points.
Represents a review process that is not modeled in DotPdf. Since review process in Acrobat does not contain all possible states, it is impossible to infer the full set of possible states from PDF file, so this class of review is likely to be incomplete.
In PDF, annotations can optionally specify their intended meaning and use. For some annotations, such as TextBoxAnnotation, CalloutAnnotation, and TypeWriterAnnotation, there is not always a reliable way to disambiguate one annotation from another in the PDF file without having an AnnotationIntent set in the Intent property of an annotation. When an AnnotationIntent is mandatory, DotPdf classes will enforce them and ensure they are correct. When it is optional, it is typically left out.
Determines alignment of text drawn in certain types of annotations.
Some annotations can be shown with a "cloudy" effect on the border. This enumeration is used for specifying it.
BorderStyleKind is used to specify how the borders of simple annotations should appear on the page. None is default.
Determines where to locate a caption on a line
The symbol to use for a insertion annotation
Determines how a ChoiceWidgetAnnotation will appear in the user interface.
Annotations with lines may have decorative ends. This enumeration specifies those ends.
Specifies how a line is to be used
Determines how a link annotation should respond when clicked
Represents the type of reply a BaseMarkupAnnotation represents.
Determines how a rubber stamp will appear from the set of standard PDF types.
Determines the type of text markup in a TextMarkupAnnotation
Determines how a clickable widget will appear when it is clicked.