ASP.NET Core

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfTiffImage - ASP.NETCore API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfTiffImage

    Inheritance
    System.Object
    PdfGraphicsElement
    PdfLayoutElement
    PdfShapeElement
    PdfImage
    PdfTiffImage
    Inherited Members
    PdfImage.FromStream(Stream)
    PdfImage.GetPixelSize(Single, Single)
    PdfImage.SetResolution(Single, Single)
    PdfImage.Metadata
    PdfShapeElement.GetBounds()
    PdfShapeElement.Layout(PdfLayoutParams)
    PdfLayoutElement.add_EndPageLayout(EndPageLayoutEventHandler)
    PdfLayoutElement.remove_EndPageLayout(EndPageLayoutEventHandler)
    PdfLayoutElement.add_BeginPageLayout(BeginPageLayoutEventHandler)
    PdfLayoutElement.remove_BeginPageLayout(BeginPageLayoutEventHandler)
    PdfLayoutElement.Draw(PdfPage, PointF)
    PdfLayoutElement.Draw(PdfPage, Single, Single)
    PdfLayoutElement.Draw(PdfPage, RectangleF)
    PdfLayoutElement.Draw(PdfPage, PointF, PdfLayoutFormat)
    PdfLayoutElement.Draw(PdfPage, Single, Single, PdfLayoutFormat)
    PdfLayoutElement.Draw(PdfPage, RectangleF, PdfLayoutFormat)
    PdfLayoutElement.Layout(HtmlToPdfLayoutParams)
    PdfLayoutElement.PdfTag
    PdfLayoutElement.EndPageLayout
    PdfLayoutElement.BeginPageLayout
    PdfGraphicsElement.Draw(PdfGraphics)
    PdfGraphicsElement.Draw(PdfGraphics, PointF)
    PdfGraphicsElement.Draw(PdfGraphics, Single, Single)
    Namespace: Syncfusion.Pdf.Graphics
    Assembly: Syncfusion.Pdf.Imaging.Portable.dll
    Syntax
    public class PdfTiffImage : PdfImage, IPdfWrapper

    Constructors

    PdfTiffImage(Image)

    Declaration
    public PdfTiffImage(Image image)
    Parameters
    Type Name Description
    System.Drawing.Image image

    PdfTiffImage(Stream)

    Declaration
    public PdfTiffImage(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    PdfTiffImage(Stream, Boolean)

    Declaration
    public PdfTiffImage(Stream stream, bool enableMetadata)
    Parameters
    Type Name Description
    System.IO.Stream stream
    System.Boolean enableMetadata

    Properties

    ActiveFrame

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

    FrameCount

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

    Height

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

    HorizontalResolution

    Declaration
    public float HorizontalResolution { get; }
    Property Value
    Type Description
    System.Single

    Mask

    Gets or sets the mask of bitmap.

    Declaration
    public PdfMask Mask { get; set; }
    Property Value
    Type Description
    PdfMask

    New PdfMask represents the mask image.

    Examples
    //Create a PDF document
    PdfDocument doc = new PdfDocument();
    //Add pages to the document
    PdfPage page = doc.Pages.Add();
    //Create PDF graphics for the page
    PdfGraphics graphics = page.Graphics;
    //Load the TIFF image
    FileStream imageStream = new FileStream("image.tif", FileMode.Open, FileAccess.Read);
    PdfBitmap image = new PdfBitmap(imageStream);
    //Create masking image
    FileStream maskStream = new FileStream("mask.bmp", FileMode.Open, FileAccess.Read);
    PdfImageMask mask = new PdfImageMask(new PdfBitmap(maskStream));
    image.Mask = mask;
    //Draw the image
    graphics.DrawImage(image, 0, 0);
    //Creating the stream object
    MemoryStream stream = new MemoryStream();
    //Save the document as stream
    doc.Save(stream);
    //Close the document
    doc.Close(true);
     'Create a PDF document
     Dim doc As New PdfDocument()
     'Add pages to the document
     Dim page As PdfPage = doc.Pages.Add()
     'Create PDF graphics for the page
     Dim graphics As PdfGraphics = page.Graphics
     'Load the TIFF image
     Dim imageStream As New FileStream("image.tif", FileMode.Open, FileAccess.Read)
     'Load the TIFF image
     Dim image As New PdfTiffImage(imageStream)
     'Load the masking image
     Dim maskStream As New FileStream("mask.bmp", FileMode.Open, FileAccess.Read)
     'Create masking image
     Dim mask As New PdfImageMask(New PdfTiffImage(maskStream))
     image.Mask = mask
     'Draw the image
     graphics.DrawImage(image, 0, 0)
     'Saves the document
     doc.Save("Output.pdf")
     'Close the document
     doc.Close(True)

    PhysicalDimension

    Declaration
    public override SizeF PhysicalDimension { get; }
    Property Value
    Type Description
    Syncfusion.Drawing.SizeF
    Overrides
    PdfImage.PhysicalDimension

    VerticalResolution

    Declaration
    public float VerticalResolution { get; }
    Property Value
    Type Description
    System.Single

    Width

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

    Methods

    GetPointSize(Single, Single)

    Declaration
    protected SizeF GetPointSize(float width, float height)
    Parameters
    Type Name Description
    System.Single width
    System.Single height
    Returns
    Type Description
    Syncfusion.Drawing.SizeF

    GetPointSize(Single, Single, Single, Single)

    Declaration
    protected SizeF GetPointSize(float width, float height, float horizontalResolution, float verticalResolution)
    Parameters
    Type Name Description
    System.Single width
    System.Single height
    System.Single horizontalResolution
    System.Single verticalResolution
    Returns
    Type Description
    Syncfusion.Drawing.SizeF
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved