menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfImageInfo - API Reference

    Show / Hide Table of Contents

    Class PdfImageInfo

    Inheritance
    System.Object
    PdfImageInfo
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Pdf.Exporting
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public class PdfImageInfo

    Properties

    Bounds

    Gets the image boundary location.

    Declaration
    public RectangleF Bounds { get; }
    Property Value
    Type Description
    System.Drawing.RectangleF

    Image

    Gets the Image.

    Declaration
    public Image Image { get; }
    Property Value
    Type Description
    System.Drawing.Image

    Index

    Gets the Image index.

    Declaration
    public int Index { get; }
    Property Value
    Type Description
    System.Int32

    IsImageInterpolated

    Returns true, when the image property in the PDF document is set to undergo interpolation.

    Declaration
    public bool IsImageInterpolated { get; }
    Property Value
    Type Description
    System.Boolean

    IsImageMasked

    Returns true, if image masking is applied. Set to true when the image is undergone image masking.

    Declaration
    public bool IsImageMasked { get; }
    Property Value
    Type Description
    System.Boolean

    IsSoftMasked

    Returns true, if soft masking is applied. Set to true when the image is undergone soft masking.

    Declaration
    public bool IsSoftMasked { get; }
    Property Value
    Type Description
    System.Boolean

    Metadata

    Gets XMP metadata of the image.

    Declaration
    public XmpMetadata Metadata { get; }
    Property Value
    Type Description
    XmpMetadata
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Add a page to the document.
    PdfPage page = doc.Pages.Add();
    //Create PDF graphics for the page
    PdfGraphics graphics = page.Graphics;
    //Load the image from the disk with enable metadata extraction.
    PdfBitmap image = new PdfBitmap(File.OpenRead("Autumn Leaves.jpg"), true);
    //Get image metadata
    XmpMetadata metadata = image.Metadata;
    //Draw the image
    graphics.DrawImage(image, 0, 0);
    //Save the document.
    doc.Save("Output.pdf");
    //Close the document.
    doc.Close(true);
    'Create a new PDF document.
    Dim doc As New PdfDocument()
    'Add a page to the document.
    Dim page As PdfPage = doc.Pages.Add()
    'Create PDF graphics for the page
    Dim graphics As PdfGraphics = page.Graphics
    'Load the image from the disk with enable metadata extraction.
    Dim image As New PdfBitmap(File.OpenRead("Autumn Leaves.jpg"), true)
    'Get image metadata
     Dim metadata As XmpMetadata = image.Metadata
    'Draw the image
    graphics.DrawImage(image, 0, 0)
    'Save the document.
    doc.Save("Output.pdf")
    'Close the document.
    doc.Close(True)
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved