.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfGraphicsAcroFormBorderAppearance Class

Contains border appearance settings of an interactive form field.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.2.Drawing.dll

Declaration

public class PdfGraphicsAcroFormBorderAppearance

Example

This example shows how to use PDF Graphics API to create a check box field and add it to a new page.

using DevExpress.Pdf;
using System.Drawing;
//...
static void Main(string[] args)
{
    using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
    {
        // Create an empty document. 
        processor.CreateEmptyDocument("..\\..\\Result.pdf");

        // Create graphics and draw a check box field.
        using (PdfGraphics graphics = processor.CreateGraphics())
        {
            DrawCheckBoxField(graphics);

            // Render a page with graphics.
            processor.RenderNewPage(PdfPaperSize.Letter, graphics);
        }
    }
}

static void DrawCheckBoxField(PdfGraphics graphics)
{
    // Create a check box field specifying its name and location.
    PdfGraphicsAcroFormCheckBoxField checkBox = new PdfGraphicsAcroFormCheckBoxField("check box", new RectangleF(20, 20, 30, 30));

    // Specify check box appearance, checked state, and button style.
    checkBox.Appearance.BackgroundColor = Color.Azure;
    checkBox.Appearance.BorderAppearance = new PdfGraphicsAcroFormBorderAppearance()
    { Color = Color.Red };
    checkBox.IsChecked = true;
    checkBox.ButtonStyle = PdfAcroFormButtonStyle.Star;

    // Add the field to the document.
    graphics.AddFormField(checkBox);
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the PdfGraphicsAcroFormBorderAppearance class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Object
PdfGraphicsAcroFormBorderAppearance
See Also