Class PdfImageType
Specifies the type of the PdfImage.
Inheritance
System.Object
PdfImageType
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public sealed class PdfImageType : Enum
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;
string rtfData = @"{\rtf1\ansi\deff0 {\colortbl;\red0\green0\blue0;\red255\green0\blue0; }Default Color\line\cf2Red Color\line\cf1Default Color}";
//Load image from rtf data.
PdfImage image = PdfImage.FromRtf(rtfData, 200, PdfImageType.Bitmap)
//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
Dim rtfData As String = "{\rtf1\ansi\deff0 {\colortbl;\red0\green0\blue0;\red255\green0\blue0; }Default Color\line\cf2Red Color\line\cf1Default Color}"
'Load image from rtf data.
Dim Image As PdfImage = PdfImage.FromRtf(rtfData, 200, PdfImageType.Bitmap)
'Draw the image
graphics.DrawImage(image, 0, 0)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
Fields
Bitmap
Specifies the image is bitmap.
Declaration
public const PdfImageType Bitmap
Field Value
Type |
---|
PdfImageType |
Metafile
Specifies the image is metafile.
Declaration
public const PdfImageType Metafile
Field Value
Type |
---|
PdfImageType |