Skip to main content

PdfShapeSubtypeMode Enum

Definition​

Assembly:Avalonia.Controls.PdfViewer
Package:Avalonia.Controls.PdfViewer

How shape annotations (rectangles, ellipses, lines, arrows, polygons, stars) are written to the file. Text boxes are always written as /FreeText, and curved lines, which have no standard subtype, as /Stamp.

public enum PdfShapeSubtypeMode

Inheritance: Enum -> PdfShapeSubtypeMode

Remarks​

A standard subtype (/Square, /Circle, /Line, /Polygon) lets other readers select and edit the shape, but a reader that edits it regenerates the appearance from the dictionary and drops what the specification has no keys for: rotation, corner radius, star geometry and any text drawn inside the shape. A /Stamp is never regenerated, so it survives round trips through other editors pixel for pixel, but is not editable there.

Fields​

NameDescription
AutoStandard subtype for shapes without text; a shape that carries text is written as a /Stamp so no reader regenerates over the text. This is how macOS Preview stores its own shapes.
StandardStandard subtype for every shape, text or not. Text is kept in /Contents and in the appearance stream, and is lost if another reader edits the shape.
StrictStandard subtype for every shape, and nothing non-standard can be produced: text cannot be added to shapes (text already in a loaded file still displays) and lines cannot be curved.

Auto Field​

Standard subtype for shapes without text; a shape that carries text is written as a /Stamp so no reader regenerates over the text. This is how macOS Preview stores its own shapes.

public Avalonia.Controls.PdfShapeSubtypeMode Auto

Standard Field​

Standard subtype for every shape, text or not. Text is kept in /Contents and in the appearance stream, and is lost if another reader edits the shape.

public Avalonia.Controls.PdfShapeSubtypeMode Standard

Strict Field​

Standard subtype for every shape, and nothing non-standard can be produced: text cannot be added to shapes (text already in a loaded file still displays) and lines cannot be curved.

public Avalonia.Controls.PdfShapeSubtypeMode Strict