File Formats

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfAttachmentIcon

    Show / Hide Table of Contents

    Enum PdfAttachmentIcon

    Specifies the type of icon to be used in displaying file attachment annotations.

    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfAttachmentIcon
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page.
    PdfPage page = document.Pages.Add();
    //Create a new rectangle
    RectangleF attachmentRectangle = new RectangleF(10, 40, 30, 30);
    //Create a new attachment annotation.
    PdfAttachmentAnnotation attachmentAnnotation = new PdfAttachmentAnnotation(attachmentRectangle, @"Input.jpg");
    //Set the Attachment icon to attachment annotation.
    attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin;
    //Add this annotation to a new page.
    page.Annotations.Add(attachmentAnnotation);
    //Save the  document to disk.
    document.Save("Output.pdf");
    //close the document
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page.
    Dim page As PdfPage = document.Pages.Add()
    'Create a new rectangle
    Dim attachmentRectangle As New RectangleF(10, 40, 30, 30)
    'Create a new attachment annotation.
    Dim attachmentAnnotation As New PdfAttachmentAnnotation(attachmentRectangle, "Input.jpg")
    'Set the Attachment icon to attachment annotation.
    attachmentAnnotation.Icon = PdfAttachmentIcon.PushPin
    'Add this annotation to a new page.
    page.Annotations.Add(attachmentAnnotation)
    'Save the  document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)

    Fields

    Name Description
    Graph

    Type of icon used in file attachment annotation.

    Paperclip

    Type of icon used in file attachment annotation.

    PushPin

    Type of icon used in file attachment annotation.

    Tag

    Type of icon used in file attachment annotation.

    See Also
    PdfDocument
    PdfPage
    PdfAttachmentAnnotation
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved