Class PdfTiffImage
Inheritance
System.Object
PdfTiffImage
Implements
System.IDisposable
Inherited Members
Syncfusion.Pdf.Graphics.PdfLayoutElement.add_EndPageLayout(Syncfusion.Pdf.Graphics.EndPageLayoutEventHandler)
Syncfusion.Pdf.Graphics.PdfLayoutElement.remove_EndPageLayout(Syncfusion.Pdf.Graphics.EndPageLayoutEventHandler)
Syncfusion.Pdf.Graphics.PdfLayoutElement.add_BeginPageLayout(Syncfusion.Pdf.Graphics.BeginPageLayoutEventHandler)
Syncfusion.Pdf.Graphics.PdfLayoutElement.remove_BeginPageLayout(Syncfusion.Pdf.Graphics.BeginPageLayoutEventHandler)
Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(Syncfusion.Pdf.PdfPage, Syncfusion.Drawing.PointF)
Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(Syncfusion.Pdf.PdfPage, Syncfusion.Drawing.RectangleF)
Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(Syncfusion.Pdf.PdfPage, Syncfusion.Drawing.PointF, Syncfusion.Pdf.Graphics.PdfLayoutFormat)
Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(Syncfusion.Pdf.PdfPage, Syncfusion.Drawing.RectangleF, Syncfusion.Pdf.Graphics.PdfLayoutFormat)
Syncfusion.Pdf.Graphics.PdfGraphicsElement.Draw(Syncfusion.Pdf.Graphics.PdfGraphics, Syncfusion.Drawing.PointF)
Assembly: Syncfusion.Pdf.Imaging.Portable.dll
Syntax
public class PdfTiffImage : PdfImage, IPdfWrapper, IDisposable
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
Overrides
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
Dispose()
Declaration
Finalize()
Releases unmanaged resources and performs other cleanup operations before the
PdfTiffImage is reclaimed by garbage collection.
Declaration
protected override void Finalize()
GetPointSize(Single, Single)
Declaration
protected SizeF GetPointSize(float width, float height)
Parameters
Type |
Name |
Description |
System.Single |
width |
|
System.Single |
height |
|
Returns
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
Implements
System.IDisposable