Syncfusion.Pdf.Imaging.NET
Represents the extension for exporting Barcode as image.
Class
Generates an image for the barcode and returns it as a stream of data.
A stream containing the generated barcode image.
//Creates a new PDF data matrix barcode.
PdfDataMatrixBarcode barcode = new PdfDataMatrixBarcode();
//Set the barcode text.
barcode.Text = "Test";
//Set the dimension of the barcode.
barcode.XDimension = 5;
//Export the barcode as image.
Image img = barcode.ToImage();
//Save document to disk.
img.Save("barcode.png", ImageFormat.Png);
//Creates a new PDF data matrix barcode.
Dim barcode As PdfDataMatrixBarcode = New PdfDataMatrixBarcode()
//Set the barcode text.
barcode.Text = "Test"
//Set the dimension of the barcode.
barcode.XDimension = 5;
//Export the barcode as image.
Dim img As Image = barcode.ToImage()
//Save document to disk.
img.Save("barcode.png", ImageFormat.Png)
Generates an image for the barcode with the specified size and returns it as a stream of data.
The size of the image to generate.
A stream containing the generated barcode image.
//Creates a new PDF data matrix barcode.
PdfDataMatrixBarcode barcode = new PdfDataMatrixBarcode();
//Set the barcode text.
barcode.Text = "Test";
//Set the dimension of the barcode.
barcode.XDimension = 5;
//Export the barcode as image.
Image img = barcode.ToImage(new SizeF(200,200));
//Save document to disk.
img.Save("barcode.png", ImageFormat.Png);
//Creates a new PDF data matrix barcode.
Dim barcode As PdfDataMatrixBarcode = New PdfDataMatrixBarcode()
//Set the barcode text.
barcode.Text = "Test"
//Set the dimension of the barcode.
barcode.XDimension = 5;
//Export the barcode as image.
Dim img As Image = barcode.ToImage(New SizeF(200, 200))
//Save document to disk.
img.Save("barcode.png", ImageFormat.Png)
Generates an image for the barcode and returns it as a stream of data.
A stream containing the generated barcode image.
//Creates a new PdfCode11Barcode.
PdfCode11Barcode barcode = new PdfCode11Barcode();
//Set the barcode text.
barcode.Text = "00-74-23-90";
//Exporting barcode as image
Image img = barcode.ToImage();
//Save the image into Disk
img.Save("barcode.png", ImageFormat.Png);
//Creates a new PdfCode11Barcode.
Dim barcode As PdfCode11Barcode = New PdfCode11Barcode()
//Set the barcode text.
barcode.Text = "00-74-23-90"
//Exporting barcode as image
Dim img As Image = barcode.ToImage()
//Save document to disk.
img.Save("barcode.png", ImageFormat.Png)
Generates an image for the barcode with the specified size and returns it as a stream of data.
The size of the image to generate.
A stream containing the generated barcode image.
//Creates a new PdfCode11Barcode.
PdfCode11Barcode barcode = new PdfCode11Barcode();
//Set the barcode text.
barcode.Text = "00-74-23-90";
//Exporting barcode as image
Image img = barcode.ToImage(new SizeF(200,200));
//Save the image into Disk
img.Save("barcode.png", ImageFormat.Png);
//Creates a new PdfCode11Barcode.
Dim barcode As PdfCode11Barcode = New PdfCode11Barcode()
//Set the barcode text.
barcode.Text = "00-74-23-90"
//Exporting barcode as image
Dim img As Image = barcode.ToImage(New SizeF(200,200))
//Save document to disk.
img.Save("barcode.png", ImageFormat.Png)
Represents the extension methods for the class.
Get the from the specified stream.
Current PDF graphics.
Image stream.
PDF document to store the identical images.
Represents the PdfBitmapExtension class.
The extension converts the unsupported image formats such as BMP, GIF, ICO, and Webp to PNG using Skiasharp and returns the PdfBitmap object.
Creates the PdfBitmap using image stream.
The data stream used to load the image.
//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;
FileStream imageStream = new FileStream("image4.jpg", FileMode.Open, FileAccess.Read);
PdfBitmap bitmap = PdfBitmapExtension.CreatePdfBitmap(imageStream);
graphics.DrawImage(bitmap, new RectangleF(0, 0, 500, 500));
//Save the document.
MemoryStream ms = new MemoryStream();
doc.Save(ms);
//Close the document.
doc.Close(true);
Holds mask image.
Holds mask type flag.
Gets the image mask for the bitmap (Read only).
This property is not supported in WinRT, Windows Phone, Xamarin, Universal Windows Platform and Silverlight.
The represents the image mask.
//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
PdfBitmap image = new PdfBitmap("image.tif");
//Create masking image
PdfImageMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
//Get the mask image.
PdfBitmap maskedImage = mask.Mask;
image.Mask = mask;
//Draw the image
graphics.DrawImage(image, 0, 0);
//Saves the document
doc.Save("Output.pdf");
//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 image As New PdfBitmap("image.tif")
'Create masking image
Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
'Get the mask image.
Dim maskedImage As PdfBitmap = mask.Mask
image.Mask = mask
'Draw the image
graphics.DrawImage(image, 0, 0)
'Saves the document
doc.Save("Output.pdf")
'Close the document
doc.Close(True)
Gets the mask type for the bitmap (Read only).
This property is not supported in WinRT, Windows Phone, Xamarin, Universal Windows Platform and Silverlight.
true if soft mask; otherwise, hard mask false.
//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
PdfBitmap image = new PdfBitmap("image.tif");
//Create masking image
PdfImageMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
//Check soft mask.
bool isSoftMask = mask.SoftMask;
image.Mask = mask;
//Draw the image
graphics.DrawImage(image, 0, 0);
//Saves the document
doc.Save("Output.pdf");
//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 image As New PdfBitmap("image.tif")
'Create masking image
Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
'Check soft mask.
Dim isSoftMask As Boolean = mask.SoftMask
image.Mask = mask
'Draw the image
graphics.DrawImage(image, 0, 0)
'Saves the document
doc.Save("Output.pdf")
'Close the document
doc.Close(True)
Initializes a new instance of the PdfImageMask class from the specified
This property is not supported in WinRT, Windows Phone, Xamarin, Universal Windows Platform and Silverlight.
The PdfBitmap which represents the image
//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
PdfBitmap image = new PdfBitmap("image.tif");
//Create masking image
PdfImageMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
image.Mask = mask;
//Draw the image
graphics.DrawImage(image, 0, 0);
//Saves the document
doc.Save("Output.pdf");
//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 image As New PdfBitmap("image.tif")
'Create masking image
Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
image.Mask = mask
'Draw the image
graphics.DrawImage(image, 0, 0)
'Saves the document
doc.Save("Output.pdf")
'Close the document
doc.Close(True)
The contains methods and properties to handle the Bitmap images
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Initializes a new instance of the class from the specified data stream.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
Load multi frame TIFF image
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Initializes a new instance of the class from the specified data stream.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
Load multi frame TIFF image with enable XMP metadata extraction
PdfTiffImage tiffImage = new PdfTiffImage(imageStream, true);
//Get xmp metadata
XmpMetadata metadata = tiffImage.Metadata;
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image with enable XMP metadata extraction
Dim tiffImage As New PdfTiffImage(imageStream, true)
'Get xmp metadata
Dim metadata As XmpMetadata = tiffImage.Metadata
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Releases unmanaged resources and performs other cleanup operations before the
is reclaimed by garbage collection.
Gets frame count of the image.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Gets the height value of the image
// Create a new PDF document.
PdfDocument doc = new PdfDocument();
// Set page margins.
doc.PageSettings.Margins.All = 0;
// Load the multi-frame TIFF image from the disk.
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
// Get the frame count.
int frameCount = tiffImage.FrameCount;
// Get image height.
float imageHeight = tiffImage.Height;
// Access each frame and draw into the page.
for (int i = 0; i < frameCount; i++)
{
// Add a new page to the document.
PdfPage page = doc.Pages.Add();
// Get PDF graphics for the page.
PdfGraphics graphics = page.Graphics;
// Set the active frame.
tiffImage.ActiveFrame = i;
// Draw the image onto the page.
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
// Create a stream object.
MemoryStream stream = new MemoryStream();
// Save the document as a stream.
doc.Save(stream);
// If the position is not set to '0', then the PDF will be empty.
stream.Position = 0;
// Close the document.
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the multi frame TIFF image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load the image from stream
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Get image height
Dim imageHeight As Single = image.Height
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Gets the width value of the image
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Get image width
float imageWidth = tiffImage.Width;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Get image width
Dim imageWidth As Single = image.Width
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Gets or sets the active frame of the image.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Gets the vertical resolution of the image.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Get the vertical resolution of the image.
float vResolution = tiffImage.VerticalResolution;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Get the vertical resolution.
Dim vResolution As Single = tiffImage.VerticalResolution
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Gets the horizontal resolution of the image.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Get the horizontal resolution of the image.
float hResolution = tiffImage.HorizontalResolution;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Get the horizontal resolution.
Dim hResolution As Single = tiffImage.HorizontalResolution
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Get the image physical dimension.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
PdfTiffImage tiffImage = new PdfTiffImage(imageStream);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Get the physical dimension of the image.
float dimension = tiffImage.PhysicalDimension;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(imageStream)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Get the physical dimension
Dim dimenstion As Single = tiffImage.PhysicalDimension
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
Get the Tiff image
Gets the SKBitmap
Gets or sets the mask of bitmap.
New PdfMask represents the mask image.
//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)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
//Create a new PDF document
PdfDocument doc = new PdfDocument();
//Set page margins
doc.PageSettings.Margins.All = 0;
//Load the multi frame TIFF image from the disk
FileStream imageStream = new FileStream("image.tiff", FileMode.Open, FileAccess.Read);
//Load the image from stream
Image image = Image.FromStream(imageStream)
PdfTiffImage tiffImage = new PdfTiffImage(image);
//Get the frame count
int frameCount = tiffImage.FrameCount;
//Access each frame and draw into the page
for (int i = 0; i < frameCount; i++)
{
PdfPage page = doc.Pages.Add();
PdfGraphics graphics = page.Graphics;
tiffImage.ActiveFrame = i;
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height);
}
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document as stream
doc.Save(stream);
//If the position is not set to '0' then the PDF will be empty
stream.Position = 0;
//Close the document
doc.Close(true);
tiffImage.Dispose();
'Create a PDF document
Dim pdfDocument As New PdfDocument()
'Set page margins
pdfDocument.PageSettings.Margins.All = 0
'Load the image from the disk
Dim imageStream As New FileStream("image.tiff", FileMode.Open, FileAccess.Read)
Load the image from stream
Dim image As Image = Image.FromStream(imageStream)
'Load multi frame TIFF image
Dim tiffImage As New PdfTiffImage(Image)
'Get the frame count
Dim frameCount As Integer = tiffImage.FrameCount
'Access each frame and draw into the page
For i As Integer = 0 To frameCount - 1
Dim page As PdfPage = pdfDocument.Pages.Add()
Dim graphics As PdfGraphics = page.Graphics
tiffImage.ActiveFrame = i
graphics.DrawImage(tiffImage, 0, 0, page.GetClientSize().Width, page.GetClientSize().Height)
Next
Dim stream As New MemoryStream()
'Save and close the document
pdfDocument.Save(stream)
pdfDocument.Close(True)
tiffImage.Dispose()
Disposes the specified disposing.
if it is disposing, set to true.
Saves the image into stream.
Combine orignal and mask image
Create Color Mask
Convert TIFF filter image to PNG Stream
Bitmap
Get the metadata from image stream
Gets the PdfImage
Get the size of the image
Check the image stream is valid or not
Update the horizontal and vertical resolution from the image
Copy stream from one to another
Convert to get Original Tiff Image Data to Pdf Image Data
Update the image filter
Updates the image color space
Gets the device color
Gets the image size
Convert the image to pdf image data
Convert sample planer separator to contig
Convert to Palette
Is Jpeg Strip Data
Convert Rgba To Rgb
Convert Rgbaa To Rgb
Convert Abgr To Rgb
Convert Lab Signed To Unsigned
New Method added
Gets the equivalent SKEncodedImageFormat for the input ImageFormat.
Image format used for encoding image.
Equivalent SKEncodedImageFormat for the input ImageFormat.
New Property
New Constructor
New Method
New Method
New Method
Update the PathGradientBrush with updated values
Specifies the display and layout information for text strings.
Font
Create FontFamily with fontName
Create FontFamily with fontName and fontSize
Create FontFamily with typeface
Gets Font Family Name
Gets TypeFace Name
Check Font Style
Gets Font EM Height
Gets Font Cell Ascent
Gets Font Cell Descent
Get Font Line Spacing
Extension Class
GetSKMatrix
GetSKColor
GetColor
Brush
SKPaint
Create Brush with Color
Gets SKPaint
Gets StrokeWidth
Gets Shader
Gets FilterQuality
Gets Color
RenderHelper
PointToPixelScalingFactor
Gets graphics
Gets Rectangle
Gets Rectangle
Gets Path
Gets Path
Gets Image Rectangle
Gets Image Rectangle
Gets Clip Rectangle
GraphicsState
m_nativeState
Save state
Bitmap Data
Image
ImageLockMode
Convert the existing PDF document to PDF/A document.
//Load an existing PDF document
FileStream docStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read);
PdfLoadedDocument doc = new PdfLoadedDocument(docStream);
//Sample level Font event handling
doc.SubstituteFont += LoadedDocument_SubstituteFont;
//Convert the loaded document to PDF/A document
doc.ConvertToPDFA(PdfConformanceLevel.Pdf_A1B);
MemoryStream stream = new MemoryStream();
//Save the document
doc.Save(stream);
//Close the document
doc.Close(true);
'Load an existing PDF document
Dim docStream As FileStream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read)
Dim document As New PdfLoadedDocument(docStream)
document.SubstituteFont += LoadedDocument_SubstituteFont
'Convert the loaded document to PDF/A document
document.ConvertToPDFA(PdfConformanceLevel.Pdf_A1B)
Dim stream As MemoryStream = New MemoryStream()
'Save the document
doc.Save(stream)
'Close the document.
document.Close(True)
Local variable to store if page updated.
Internal variable to store image count for the page.
Local variable to store resource information
Local variable to store information about images.
Local variable to store image information.
ArrayList to store the extracted images.
List to store the image information.
List to store image keys.
Stack to maintain the current matrix.
Clear the page resource and record collection
Replace the Image at index's Position.
index of an image
The New Replace image
//Load the PDF document
PdfLoadedDocument doc = new PdfLoadedDocument(@"input.pdf");
//Create an image instance
PdfBitmap bmp = new PdfBitmap(@"Autumn Leaves.jpg");
//Replace the first image in the page.
doc.Pages[0].ReplaceImage(0, bmp);
//Save the document
doc.Save("output.pdf");
//Close the document
doc.Close(true);
'Load the PDF document///Dim doc As New PdfLoadedDocument("input.pdf")
'Create an image instance
Dim bmp As New PdfBitmap("Autumn Leaves.jpg")
'Replace the first image in the page.
doc.Pages(0).ReplaceImage(0, bmp)
'Save the document
doc.Save("output.pdf")
'Close the document
doc.Close(True)
Extracts image information from the given PDF Page.
Returns the extracted image information as PdfImageInfo[].
Gets the XObject from the Resource dictionary
Page resource
XObject
Gets the information about the extracted image from the PDF page.
//Load PDF document.
FileStream input = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read);
PdfLoadedDocument document = new PdfLoadedDocument(input);
//Gets ImageInfo from the first page.
PdfImageInfo[] imageInfo = document.Pages[0].ExtractImages();
//Gets the Image Boundary location.
RectangleF imageBounds = imageInfo[0].Bounds;
//Gets the Image.
Image image = imageInfo[0].Image;
//Gets the Image index.
int imageIndex = imageInfo[0].Index;
//Closing the PDF document.
document.Close(true);
'Load PDF document.
Dim input As New FileStream("Input.pdf", FileMode.Open, FileAccess.Read)
Dim document As New PdfLoadedDocument(input)
'Gets ImageInfo from the first page.
Dim imageInfo As PdfImageInfo() = document.Pages(0).ExtractImages();
'Gets the Image Boundary location.
Dim imageBounds As RectangleF = imageInfo(0).Bounds
'Gets the Image.
Dim image As Image = imageInfo(0).Image
'Gets the Image index.
Dim imageIndex As Integer = imageInfo(0).Index
'Closing the PDF document.
document.Close(True)
Class
Class
Replace the image at the index position.
index of an image
The New Replace image
//Load the PDF document
FileStream input = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read);
PdfLoadedDocument doc = new PdfLoadedDocument(input);
//Create an image instance
PdfBitmap bmp = new PdfBitmap(new FileStream("Autumn Leaves.jpg", FileMode.Open, FileAccess.Read));
//Replace the first image in the page.
doc.Pages[0].ReplaceImage(0, bmp);
MemoryStream stream = new MemoryStream();
//Save the document
doc.Save(stream);
//Close the document
doc.Close(true);
'Load the PDF document
Dim input As New FileStream("Input.pdf", FileMode.Open, FileAccess.Read)
Dim doc As New PdfLoadedDocument(input)
Dim input As New FileStream("Autumn Leaves.jpg", FileMode.Open, FileAccess.Read)
'Create an image instance
Dim bmp As New PdfBitmap(input)
'Replace the first image in the page.
doc.Pages(0).ReplaceImage(0, bmp)
Dim stream As New MemoryStream()
'Save the document
doc.Save(stream)
'Close the document
doc.Close(True)
Remove the image from the PDF page in the existing PDF document.
//Load an existing PDF.
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName);
//Load first page.
PdfPageBase pageBase = loadedDocument.Pages[0];
//Extract images from first page.
PdfImageInfo imageInfo = loadedDocument.Pages[0].ImagesInfo[0];
//Remove the Image.
loadedDocument.Pages[0].RemoveImage(imageInfo);
MemoryStream stream = new MemoryStream();
//Save the document
loadedDocument.Save(stream);
//close the document
loadedDocument.Close(true);
'Load an existing PDF
Dim loadedDocument As PdfLoadedDocument = New PdfLoadedDocument(fileName)
'Load first page.
Dim pageBase As PdfPageBase = loadedDocument.Pages(0)
'Extract images from first page.
Dim imageInfo As PdfImageInfo = loadedDocument.Pages(0).ImagesInfo(0)
'Remove the Image.
loadedDocument.Pages(0).RemoveImage(imageInfo)
Dim stream As New MemoryStream()
'Save the document
loadedDocument.Save(stream)
'close the document
loadedDocument.Close(True)
The Syncfusion.Pdf.Exporting namespace contains classes to perform export operations.
Represents the utility class to store information about Images and its location.
//Load PDF document.
PdfLoadedDocument document = new PdfLoadedDocument("Input.pdf");
//Gets ImageInfo from the first page.
PdfImageInfo[] imageInfo = document.Pages[0].ExtractImages();
//Gets the Image Boundary location.
RectangleF imageBounds = imageInfo[0].Bounds;
//Gets the Image.
Image image = imageInfo[0].Image;
//Gets the Image index.
int imageIndex = imageInfo[0].Index;
//Closing the PDF document.
document.Close(true);
'Load PDF document.
Dim document As New PdfLoadedDocument("Input.pdf")
'Gets ImageInfo from the first page.
Dim imageInfo As PdfImageInfo() = document.Pages(0).ExtractImages()
'Gets the Image Boundary location.
Dim imageBounds As RectangleF = imageInfo(0).Bounds
'Gets the Image.
Dim image As Image = imageInfo(0).Image
'Gets the Image index.
Dim imageIndex As Integer = imageInfo(0).Index
'Closing the PDF document.
document.Close(True)
Local Variable to store the image bounds.
Local Variable to store the image.
Local Variable to store the image index.
Internal variable to store the image name.
Internal variable to store the matrix.
Internal variable to store the image name.
Internal variable , it identifies the image is extracted or not.
Indicates if the object has been disposed.
Initializes a new instance of the class.
Releases unmanaged resources and performs other cleanup operations before the
is reclaimed by garbage collection.
Gets the image boundary location.
Gets the image Stream.
//Load PDF document.
PdfLoadedDocument document = new PdfLoadedDocument("Input.pdf");
//Gets ImageInfo from the first page.
PdfImageInfo[] imageInfo = document.Pages[0].ExtractImages();
//Gets the Image Boundary location.
RectangleF imageBounds = imageInfo[0].Bounds;
//Gets the Image stream.
Stream imageStream = imageInfo[0].ImageStream;
//Gets the Image index.
int imageIndex = imageInfo[0].Index;
//Closing the PDF document.
document.Close(true);
'Load PDF document.
Dim document As New PdfLoadedDocument("Input.pdf")
'Gets ImageInfo from the first page.
Dim imageInfo As PdfImageInfo() = document.Pages(0).ExtractImages()
'Gets the Image Boundary location.
Dim imageBounds As RectangleF = imageInfo(0).Bounds
'Gets the Image stream.
Dim imageStream As Stream = imageInfo(0).ImageStream
'Gets the Image index.
Dim imageIndex As Integer = imageInfo(0).Index
'Closing the PDF document.
document.Close(True)
Gets the image filter.
//Load PDF document.
PdfLoadedDocument document = new PdfLoadedDocument("Input.pdf");
//Gets ImageInfo from the first page.
PdfImageInfo[] imageInfo = document.Pages[0].ExtractImages();
//Gets the Image Boundary location.
RectangleF imageBounds = imageInfo[0].Bounds;
//Gets the Image stream.
Stream imageStream = imageInfo[0].ImageStream;
//Gets the Image index.
int imageIndex = imageInfo[0].Index;
//Gets the Image filter.
string[] imageFilter = imageInfo[0].ImageFilter;
//Closing the PDF document.
document.Close(true);
'Load PDF document.
Dim document As New PdfLoadedDocument("Input.pdf")
'Gets ImageInfo from the first page.
Dim imageInfo As PdfImageInfo() = document.Pages(0).ExtractImages()
'Gets the Image Boundary location.
Dim imageBounds As RectangleF = imageInfo(0).Bounds
'Gets the Image stream.
Dim imageStream As Stream = imageInfo(0).ImageStream
'Gets the Image index.
Dim imageIndex As Integer = imageInfo(0).Index
'Gets the Image filter.
Dim image As String() = imageInfo(0).ImageFilter
'Closing the PDF document.
document.Close(True)
Gets the Image.
Gets the Image index.
Gets the image name.
Gets the matrix.
Gets the matrix.
Returns true, if soft masking is applied. Set to true when the image is undergone soft masking.
Returns true, if image masking is applied. Set to true when the image is undergone image masking.
Returns true, when the image property in the PDF document is set to undergo interpolation.
Gets or sets the image is extracted or not.
Gets XMP metadata of the image.
//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)
Save the image to the stream
//Load PDF document.
PdfLoadedDocument document = new PdfLoadedDocument("Input.pdf");
//Gets ImageInfo from the first page.
PdfImageInfo[] imageInfo = document.Pages[0].ExtractImages();
//Gets the Image Boundary location.
RectangleF imageBounds = imageInfo[0].Bounds;
//Save image into memory stream.
MemoryStream imageStream = new MemoryStream();
imageInfo[0].Save(imageStream);
//Closing the PDF document.
document.Close(true);
'Load PDF document.
Dim document As New PdfLoadedDocument("Input.pdf")
'Gets ImageInfo from the first page.
Dim imageInfo As PdfImageInfo() = document.Pages(0).ExtractImages()
'Gets the Image Boundary location.
Dim imageBounds As RectangleF = imageInfo(0).Bounds
'Save image into memory stream.
Dim imageStream As New MemoryStream()
imageInfo(0).Save(imageStream)
'Closing the PDF document.
document.Close(True)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
//Load PDF document.
PdfLoadedDocument document = new PdfLoadedDocument("Input.pdf");
//Gets ImageInfo from the first page.
PdfImageInfo[] imageInfo = document.Pages[0].ExtractImages();
//Dispose ImageInfo.
imageInfo[0].Dispose();
//Closing the PDF document.
document.Close(true);
'Load PDF document.
Dim document As New PdfLoadedDocument("Input.pdf")
'Gets ImageInfo from the first page.
Dim imageInfo As PdfImageInfo() = document.Pages(0).ExtractImages()
'Dispose ImageInfo.
imageInfo(0).Dispose()
'Closing the PDF document.
document.Close(True)
Disposes the specified disposing.
if it is disposing, set to true.
local variable to store the value true if image is used for extraction
Occurs prior to the rendering of every image in the document
ImagePreRenderEventArgs
Flag to indicate PDF compression image extract
Holds origial image stream
Holds mask image stream
Gets or sets "true" when an image is used for Extraction.
Holds the stream of the mask image associated with the original image
Gets BitsPerComponent value of the original image
Converts DeviceCMYK colorspace to RGB colourspace
Converts the CMYK values to RGB
Process the ColorSpace property in the Image dictionary
To Apply the ICCBased Colorspace in the Image Stream
Skips the escape sequence from the given input string
String with the escape sequence
String without escape sequence
Decodes the ASCII85 encoded stream
Encoded stream
Decoded Stream
Decodes the Flate encoded stream
Encoded stream
Decoded Stream
Decodes JBIG2 encoded input stream
Input image stream
Returns the output as image.
Merges the stream of the two images
Stream of the original image
Encoded stream of the mask image
Stream of the merged image
sRgbToScRgb conversion
Byte value of the color
Equivalent float value
ScRgbTosRgb conversion
Float value of the color
Equivalent byte value
Decodes the stream of the mask image in the PDF document
Encoded stream from the PDF document
Decoded stream of the image
Decodes the stream based on the predictor values
Predictor from the decode params
Colors from the decode params
Columns from the decode params
Stream the encoded image
Decoded stream
Converts YCCK colorspace to RGB colorspace
Byte array of YCCK image
Byte array of RGB image
Converts YCC colorspace image to RGB image
Byte array of YCC image
Byte array of RGB image
Render the RGB Pixels from the Image Bytes
Image Bytes which converts into Pixels
Convert TIFF filter image to PNG Stream
Bitmap
Internal variable that holds cff glyphs
Gets or sets the value indicating whether the encoded text is hexa decimal string
Holds the font name associated with the text element
Holds the font style of the text to be decoded.
Gets and sets whether same font is denoted in more than one XObject.
Holds the font encoding associated with the text element
Takes in the encoded text, identifies the type of encoding used, decodes the encoded text, returns the decoded text.
Encoded string from the PDF document.
Decoded string, human readable.
Decodes the octal text in the encoded text.
The text encoded from the PDF document
Decoded text with replaced octal texts
Decodes the HEX encoded string.
HEX encoded string.
Decoded string.
Extracts the font name associated with the string.
Font name.
Extracts the font style associated with the text string
Font style.
Extracts the font encoding associated with the text string
Font style.
Parsing the stream from the Adobe-Japan1-6.cidmap resource to create CIDMapTable
CID map table resource
Adobe Japan CID map table
Parse the Japanese character where the value is reference to another key in the Adobe Japan Cid Map Table
mapped value which is a reference to another key
Mapped Character present in the Adobe Japan Cid Map table
Decodes the ASCII85 encoded stream
Encoded stream
Decoded Stream
Decodes the Flate encoded stream
Encoded stream
Decoded Stream
Builds the mapping table that is used to map the decoded text to get the expected text.
A dictionary with key as the encoded element and value as the value to be mapped to.
Builds the mapping table that is used to map the decoded text to get the expected text.
Gets Latin Character
The decodedCharacter.
decodedCharacter
Gets Latin Character
The decodedCharacter.
decodedCharacter
Takes in the decoded text and maps it with its corresponding entry in the CharacterMapTable
decoded text
Expected text string
Takes in the decoded text and maps it with its corresponding entry in the CharacterMapTable
encoded text
Expected text string
Method to remove the new line character
Text with new line character
Text without new line character
Organizes the hex string enclosed within the hexa brackets
Mapping string in the map table of the document
list of HEX entries in the string
Checks whether the specified character is Non-Printable character or not.
The character to be verified as either Non-Printable or not
Returns true, if the specified character is Non-Printable character. Otherwise it returns false
Releasing, or resetting unmanaged resources.
Compress PDF documents with compression options applied.
//Load an existing PDF.
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName);
//Create new compression options instance.
PdfCompressionOptions options = new PdfCompressionOptions();
//Set image compression.
options.CompressImages = true;
//Set image quality.
options.ImageQuality = 50;
//Optimize font.
options.OptimizeFont = true;
//Optimize page contents.
options.OptimizePageContents = true;
//Remove metadata information.
options.RemoveMetadata = true;
//Set compression options.
loadedDocument.Compress(options);
//Save the document
MemoryStream stream = new MemoryStream();
loadedDocument.Save(stream);
//close the document
loadedDocument.Close(true);
'Load an existing PDF
Dim loadedDocument As PdfLoadedDocument = New PdfLoadedDocument(fileName)
'Create new compression options instance.
Dim options As PdfCompressionOptions = New PdfCompressionOptions()
'Set image compression.
options.CompressImages = True
'Set image quality.
options.ImageQuality = 50
'Optimize font.
options.OptimizeFont = True
'Optimize page contents.
options.OptimizePageContents = True
'Remove metadata information.
options.RemoveMetadata = True
'Set compression options.
loadedDocument.Compress(options)
Dim stream As New MemoryStream()
'Save the document
loadedDocument.Save(stream)
'close the document
loadedDocument.Close(True)
Set the Stroking of current graphics state brush
color value
Set the Non Stroking of current graphics state brush
color value
Determining valid email address
email address to validate
true is valid, false if not valid
Get the object from IPdfPrimitive
Represents a redactor for a loaded page.
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 50, 20));
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
//Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 50, 20))
//Add redaction object into collection
page.Redactions.Add(redaction)
'Save the document.
lDoc.Save("sample.pdf")
lDoc.Close(True)
Gets or sets the fill color on the redaction bounds (Read only).
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 50, 20));
//Set fill color for the redaction bounds
redaction.FillColor = System.Drawing.Color.Green;
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
//Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 50, 20))
//Set fill color for the redaction bounds
redaction.FillColor = Color.Green
//Add redaction object into collection
page.Redactions.Add(redaction)
'Save the document.
lDoc.Save("sample.pdf")
lDoc.Close(True)
Gets or sets whether only the text within the redaction bounds should be redacted.
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 50, 20));
//Set to redact text only
redaction.TextOnly = true;
//Set fill color for the redaction bounds
redaction.FillColor = System.Drawing.Color.Green;
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
//Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 50, 20))
'//Set to redact text only
redaction.TextOnly = true
//Set fill color for the redaction bounds
redaction.FillColor = Color.Green
//Add redaction object into collection
page.Redactions.Add(redaction)
'Save the document.
lDoc.Save("sample.pdf")
lDoc.Close(True)
Gets or sets the appearance on the redaction bounds (Read only).
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 100, 20));
//Set appearance on the redaction bounds
redaction.Appearance.Graphics.DrawString("Redacted", new PdfStandardFont(PdfFontFamily.Helvetica, 10), PdfBrushes.Black, PointF.Empty);
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
//Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 100, 20))
//Set appearance on the redaction bounds
redaction.Appearance.Graphics.DrawString("Redacted", New PdfStandardFont(PdfFontFamily.Helvetica, 10), PdfBrushes.Black, PointF.Empty)
//Add redaction object into collection
page.Redactions.Add(redaction)
'Save the document.
lDoc.Save("sample.pdf")
lDoc.Close(True)
Initializes a new instance of the class.
The rectangle bounds to be redact.
Initializes a new instance of the class.
The rectangle bounds to be redact.
The fill color on the redaction bounds.
Represents a redaction result for a loaded page.
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 50, 20));
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Redact the contents from PDF document.
List<PdfRedactionResult> results = lDoc.Redact();
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
'Get the first page from document
Dim page As PdfLoadedPage = TryCast(doc.Pages(0), PdfLoadedPage)
//Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 50, 20))
//Add redaction object into collection
page.Redactions.Add(redaction)
'Redact the contents from PDF document
Dim results As List(Of PdfRedactionResult) = lDoc.Redact()
'Save the document.
lDoc.Save("sample.pdf")
lDoc.Close(True)
Gets the page number.
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
bool value = true;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 50, 20));
//Set fill color for the redaction bounds
redaction.FillColor = System.Drawing.Color.Green;
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Perform Redaction for the loaded object and get redaction result
List<PdfRedactionResult> results = lDoc.Redact();
//Gets the redaction bounds.
RectangleF redactionBounds = results[0].RedactionBounds;
redaction.Equals(value);
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
Dim value As Boolean = True
'Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 50, 20))
'Set fill color for the redaction bounds
redaction.FillColor = Color.Green
'Add redaction object into collection
page.Redactions.Add(redaction)
'Perform Redaction for the loaded object and get redaction result
Dim results As List(Of PdfRedactionResult) = lDoc.Redact()
'Gets the redaction bounds.
Dim redactionBounds As RectangleF = results[0].RedactionBounds
'Save the document
lDoc.Save("sample.pdf")
lDoc.Close(True)
Gets the particular bounds is redacted or not. Default value is false.
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
bool value = true;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 50, 20));
//Set fill color for the redaction bounds
redaction.FillColor = System.Drawing.Color.Green;
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Perform Redaction for the loaded object and get redaction result
List<PdfRedactionResult> results = lDoc.Redact();
//Returns whether the bounds is redacted or not.
bool isRedactionSuccess = results[0].IsRedactionSuccess;
redaction.Equals(value);
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
Dim value As Boolean = True
'Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 50, 20))
'Set fill color for the redaction bounds
redaction.FillColor = Color.Green
'Add redaction object into collection
page.Redactions.Add(redaction)
'Perform Redaction for the loaded object and get redaction result
Dim results As List(Of PdfRedactionResult) = lDoc.Redact())
'Returns whether the bounds is redacted or not
Dim isRedactionSuccess As Boolean = results[0].IsRedactionSuccess
'Save the document
lDoc.Save("sample.pdf")
lDoc.Close(True)
Gets the page number.
//Load the document.
PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
//Get the first page from the document.
PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
bool value = true;
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(40, 40, 50, 20));
//Set fill color for the redaction bounds
redaction.FillColor = System.Drawing.Color.Green;
//Add redaction object into redaction collection of loaded page
page.Redactions.Add(redaction);
//Perform Redaction for the loaded object and get redaction result
List<PdfRedactionResult> results = lDoc.Redact();
//Gets the page number.
int pageNumber = results[0].PageNumber;
redaction.Equals(value);
//Save and Close the document.
lDoc.Save("sample.pdf");
lDoc.Close(true);
'Load the document.
Dim lDoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
Dim value As Boolean = True
'Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(40, 40, 50, 20))
'Set fill color for the redaction bounds
redaction.FillColor = Color.Green
'Add redaction object into collection
page.Redactions.Add(redaction)
'Perform Redaction for the loaded object and get redaction result
Dim results As List(Of PdfRedactionResult) = lDoc.Redact()
'Gets the page number
Dim pageNumber As Int = results[0].PageNumber
'Save the document
lDoc.Save("sample.pdf")
lDoc.Close(True)
Represents PdfRedactionExtension class
private variable to store list of redaction objects
Redact the contents from PDF document.
//Load the existing PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(343, 167, 100, 25), Color.Black);
//Add redaction object into redaction collection of loaded page
page.AddRedaction(redaction);
This method returns a list of redaction results.
loadedDocument.Redact();
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document into stream.
loadedDocument.Save(stream);
//Close the documents.
loadedDocument.Close(true);
'Load the existing PDF document
Dim loadedDocument As PdfLoadedDocument = New PdfLoadedDocument(docStream)
'Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(343, 167, 100, 25), Color.Black)
'Add redaction object into redaction collection of loaded page
page.AddRedaction(redaction)
'This method returns a list of redaction results.
loadedDocument.Redact()
'Creating the stream object
Dim stream As MemoryStream = New MemoryStream()
'Save the document into stream.
loadedDocument.Save(stream)
'Close the document.
loadedDocument.Close(True)
Add redaction to the PDF page.
//Load the existing PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
//Create a redaction object
PdfRedaction redaction = new PdfRedaction(new RectangleF(343, 167, 100, 25), Color.Black);
//Add redaction object into redaction collection of loaded page
page.AddRedaction(redaction);
//Redact the contents from PDF document.
loadedDocument.Redact();
//Creating the stream object
MemoryStream stream = new MemoryStream();
//Save the document into stream.
loadedDocument.Save(stream);
//Close the documents.
loadedDocument.Close(true);
'Load the existing PDF document
Dim loadedDocument As PdfLoadedDocument = New PdfLoadedDocument(docStream)
'Create a redaction object
Dim redaction As PdfRedaction = New PdfRedaction(New RectangleF(343, 167, 100, 25), Color.Black)
'Add redaction object into redaction collection of loaded page
page.AddRedaction(redaction)
'Redact the contents from PDF document.
loadedDocument.Redact()
'Creating the stream object
Dim stream As MemoryStream = New MemoryStream()
'Save the document into stream.
loadedDocument.Save(stream)
'Close the document.
loadedDocument.Close(True)
Gets collection of the page redactions.
Holds the win-ansi font charcode.
WinAnsiEncoding Charcode table
Gets the CID byte to unicode table.
Check and handle Image metadata based on PDF/A conformance standard.
Mapping complete glyph to width table for inconsistent character width
Gets the CID byte to unicode.
Local variable to store the whitepoint value of CalGray colorspace.
Local variable to store the blackpoint value of CalGray colorspace.
Local variable to store the gamma value of CalGray colorspace.
Gets the number of components for the CalGray Colorspace.
Gets or sets the Whitepoint value for the CalGray Colorspace.
Gets or sets the Blackpoint value for the CalGray Colorspace.
Gets or sets the Gamma value for the CalGray Colorspace.
Local variable to store the whitepoint value of CalRgb colorspace.
Local variable to store the blackpoint value of CalRgb colorspace.
Local variable to store the gamma value of CalRgb colorspace.
Local variable to store the matrix value of CalRgb colorspace.
Gets the number of components for the CalRgb Colorspace.
Gets or sets the Whitepoint value for the CalRgb Colorspace.
Gets or sets the Blackpoint value for the CalRgb Colorspace.
Gets or sets the Gamma value for the CalRgb Colorspace.
Gets or sets the Matrix value for the CalRgb Colorspace.
Gets the number of components for the DeviceCMYK Colorspace.
Gets the number of components for the DeviceGray Colorspace.
Local variable to store the AlternateColorspace value of DeviceN colorspace.
Local variable to store the function value of DeviceN colorspace.
Gets the number of components for the DeviceN Colorspace.
Gets or set the AlternateColorspace value for DeviceN colorspace
Gets or set the Function value for DeviceN colorspace
Set the Colorspace value to local variable from Pdfarray
ColorspaceArray
Get the Colorspace value from Pdfarray
ColorspaceArray
Colorspace
Gets the number of components for the DeviceRgb Colorspace.
Local variable to store the IccProfile value of ICCBased colorspace.
Gets or sets the IccProfile value for the ICCBased Colorspace.
Gets the Components for the IccBased Alternate Colorspace.
Local variable to store the N value of IccProfile.
Local variable to store the alternate colorspace.
Local variable to store the IccProfile value of IccBased colorspace.
Local variable to store the matrix value of CalRgb colorspace.
Gets the Alternate colorspace of IccBased colorspace.
Gets or sets the N value for the ICCBased Colorspace.
Local variable to store the BaseColorspace value of Indexed colorspace.
Local variable to store the Maximum valid index value of Indexed colorspace.
Local variable to store the Lookup parameter value of Indexed colorspace.
Gets the number of components for the Indexed Colorspace.
Gets the DefaultBrush value for the Indexed BaseColorspace.
Gets or sets the BaseColorspace value for the Indexed Colorspace.
Gets or sets the Maximum valid index value for the Indexed Colorspace.
Gets or sets the Lookup parameter value for the Indexed Colorspace.
Get the color value of Indexed colorspace
Index value for color
Color
Set the Indexed colorspace data to local variable
Index value Array
Get the Color
Color component
Color
Get the Base colorspace of Indexed color space
Index value Array
Colorspace
Get the Lookup data of Indexed colorspace
Index value Array
Get the colorspace of Base colorspace
Colorspace
Get the Decoded stream of Type0 data
Type0 stream
Decoded Byte
Decode the FlateDecode stream
Type0 encoded stream
Memory stream
Local variable to store the whitepoint value of Labcolorspace.
Local variable to store the blackpoint value of Labcolorspace.
Local variable to store the range value of Labcolorspace.
Gets the number of components for the Labcolorspace.
Gets or sets the Whitepoint value for the Labcolorspace.
Gets or sets the Blackpoint value for the Labcolorspace.
Gets or sets the Range value for the Labcolorspace.
Local variable to store the Lookup Data of Indexed colorspace
Gets the Lookup Data of Indexed colorspace
Load the Lookup stream data of Indexed color space
Lookup stream data
Load the Lookup byte string data of Indexed colorspace
Byte string
Load the Lookup data reference of Indexed color space
Reference of Lookup data
Local variable to store the PatternType value of Pattern colorspace.
Local variable to store the AlternateColorspace value of Pattern colorspace.
Local variable to store the PatternMatrix value of Pattern colorspace.
Local variable to store the Pattern value of Pattern colorspace.
Gets or sets the AlternateColorspace value for the Pattern Colorspace.
Gets or sets the PatternMatrix value for the Pattern Colorspace.
Gets or sets the PatternType value for the Pattern Colorspace.
Local variable to store the Alternate colorspace value of Seperation colorspace.
Local variable to store the Function value of Seperation colorspace founction.
Gets the number of components for the Seperation Colorspace.
Gets or sets the Alternate colorspace value for the Seperation Colorspace.
Gets or sets the Function value for the Seperation Colorspace.
Get the color value from string value
string Array
Color
Convert the string array to double array
string Array
Double array
Get the color value from bytes
string Array
Offset Value
Color
Set the Seperation colorspace data to local variable
seperation value Array
Get the Seperation colorspace Alternate colorspace from array value
seperation value Array
Alternate colorspace
Local variable to store the Domain value of Function
Local variable to store the Range value of Function
Local variable to store the dictionary of Function
Gets or sets the Domain value of Function.
Gets or sets the Range value of Function.
Create the function type from dictionary
Array
Function
Color transfer function
Input color component value
Double array
Extract the Input Data
Input data
Double array
Extract the Output Data
Output data
Double array
Perform Interpolate function
result
Clip the Data
result
Local variable to store the BitsPerSample of Type0
Local variable to store the Order of Type0
Local variable to store the Size of Type0
Local variable to store the Encode value of Type0
Local variable to store the Decode value of Type0
Local variable to store the sample value of Type0
Local variable to store the Output value count of Type0
Local variable to store the Filter of Type0 Data
Gets or sets the BitsPerSample value of Type0 function.
Gets or sets the Filter value of Type0 function.
Gets or sets the Order value of Type0 function.
Gets or sets the Decode value of Type0 function.
Gets or sets the Encode value of Type0 function.
Gets or sets the Size value of Type0 function.
Load the Type0 function stream to local variable
Type0 Data
Execute the Type0 function
Input Data
Color values
Encode the input data of Type0
EncodedData
Decode the input data of Type0
DecodedData
Get the index of data
Data
Index
Get the Decoded stream of Type0 data
Type0 stream
Decoded Byte
Decode the FlateDecode stream
Type0 encoded stream
Memory stream
Local variable to store the C0 value of Type2 function
Local variable to store the C1 value of Type2 function
Local variable to store the N value of Type2 function
Local variable to store the Functions resources value of Type2 function
Gets or sets the Function resource value of Type2 function.
Gets or sets the C0 value of Type2 function.
Gets or sets the C1 value of Type2 function.
Gets or sets the N value of Type2 function.
Gets the output element length
Perform the Type0 function
Input Data
Color values
Perform the Type0 function of Single input data
Single input data
outputData
Perform the ExponentialInterpolation function
value
value
value
result
Local variable to store the Encode value of Type3 function
Local variable to store the Bounds value of Type3 function
Local variable to store the Functions value of Type3 function
Gets or sets the Encode value of Type3 function.
Gets or sets the Bounds value of Type3 function.
Gets or sets the Function value of Type4 function.
Perform the Type4 function
Input Data
Color values
Local variable to store the Post Script Stream
Local variable to store the Filter type of Post Script
Stack pointer
List of Post Script Operator
Stack value of Post Script Data
Operator type array of Post Script Operator
Current operator type value
Gets the output element value length
Gets or sets the Filter value of Type4 function stream.
Load the Type4 function stream to local variable
Type4 Data
Get the Decoded stream of Type4 function
Type0 Data
Perform the Type4 function
Input Data
Color values
Decodes the ASCII85 encoded stream
Encoded stream
Decoded Stream
Represents the annotation with associated within a page.
Represents the URLS within a page.
Represents the URLS within a page.
Represents the Rectangle position of the matching text.
The PdfDocumentExtractor class represents a utility class designed to extract images from PDF documents with improved memory consumption and performance.
Gets the number of pages present in the document.
//Initialize the PDF document extractor
PdfDocumentExtractor documentExtractor = new PdfDocumentExtractor();
//Gets the number of pages present in the document
int pageCount = documentExtractor.PageCount;
//Loads a PDF document from a Stream.
documentExtractor.Load(fileStream);
// Extracts all the images from the PDF document
Stream[] streams = documentExtractor.ExtractImages();
//Extracts images from the specified range of pages in the PDF document
Stream[] stream = documentExtractor.ExtractImages(2, 8);
// Release all resources used by the PDF document extractor.
documentExtractor.Dispose();
'Initialize the PDF document extractor
Dim documentExtractor As PdfDocumentExtractor = New PdfDocumentExtractor
'Gets the number of pages present in the document
Dim pageCount As Integer = documentExtractor.PageCount
'Loads a PDF document from a Stream.
documentExtractor.Load(fileStream)
' Extracts all the images from the PDF document
Dim streams() As Stream = documentExtractor.ExtractImages
'Extracts images from the specified range of pages in the PDF document
Dim stream() As Stream = documentExtractor.ExtractImages(2, 8)
' Release all resources used by the PDF document extractor.
documentExtractor.Dispose
Loads a PDF document from a Stream. The method allows you to provide a password as a string parameter to decrypt the document if it is password-protected.
The stream containing the PDF document to load
The password (user or owner) of the encrypted document.
//Initialize the PDF document extractor
PdfDocumentExtractor documentExtractor = new PdfDocumentExtractor();
//Gets the number of pages present in the document
int pageCount = documentExtractor.PageCount;
//Loads a PDF document from a Stream.
documentExtractor.Load(fileStream);
// Extracts all the images from the PDF document
Stream[] streams = documentExtractor.ExtractImages();
//Extracts images from the specified range of pages in the PDF document
Stream[] stream = documentExtractor.ExtractImages(2, 8);
// Release all resources used by the PDF document extractor.
documentExtractor.Dispose();
'Initialize the PDF document extractor
Dim documentExtractor As PdfDocumentExtractor = New PdfDocumentExtractor
'Gets the number of pages present in the document
Dim pageCount As Integer = documentExtractor.PageCount
'Loads a PDF document from a Stream.
documentExtractor.Load(fileStream)
' Extracts all the images from the PDF document
Dim streams() As Stream = documentExtractor.ExtractImages
'Extracts images from the specified range of pages in the PDF document
Dim stream() As Stream = documentExtractor.ExtractImages(2, 8)
' Release all resources used by the PDF document extractor.
documentExtractor.Dispose
Extracts all the images from the PDF document and returns an array of Stream objects representing the image data.
Returns the array of image streams
//Initialize the PDF document extractor
PdfDocumentExtractor documentExtractor = new PdfDocumentExtractor();
//Gets the number of pages present in the document
int pageCount = documentExtractor.PageCount;
//Loads a PDF document from a Stream.
documentExtractor.Load(fileStream);
// Extracts all the images from the PDF document
Stream[] streams = documentExtractor.ExtractImages();
//Extracts images from the specified range of pages in the PDF document
Stream[] stream = documentExtractor.ExtractImages(2, 8);
// Release all resources used by the PDF document extractor.
documentExtractor.Dispose();
'Initialize the PDF document extractor
Dim documentExtractor As PdfDocumentExtractor = New PdfDocumentExtractor
'Gets the number of pages present in the document
Dim pageCount As Integer = documentExtractor.PageCount
'Loads a PDF document from a Stream.
documentExtractor.Load(fileStream)
' Extracts all the images from the PDF document
Dim streams() As Stream = documentExtractor.ExtractImages
'Extracts images from the specified range of pages in the PDF document
Dim stream() As Stream = documentExtractor.ExtractImages(2, 8)
' Release all resources used by the PDF document extractor.
documentExtractor.Dispose
Extracts images from the specified range of pages in the PDF document and returns an array of Stream objects representing the image data.
An integer representing the starting page index from which to extract images.
An integer representing the ending page index up to which images should be extracted.
Returns the array of image streams
//Initialize the PDF document extractor
PdfDocumentExtractor documentExtractor = new PdfDocumentExtractor();
//Gets the number of pages present in the document
int pageCount = documentExtractor.PageCount;
//Loads a PDF document from a Stream.
documentExtractor.Load(fileStream);
// Extracts all the images from the PDF document
Stream[] streams = documentExtractor.ExtractImages();
//Extracts images from the specified range of pages in the PDF document
Stream[] stream = documentExtractor.ExtractImages(2, 8);
// Release all resources used by the PDF document extractor.
documentExtractor.Dispose();
'Initialize the PDF document extractor
Dim documentExtractor As PdfDocumentExtractor = New PdfDocumentExtractor
'Gets the number of pages present in the document
Dim pageCount As Integer = documentExtractor.PageCount
'Loads a PDF document from a Stream.
documentExtractor.Load(fileStream)
' Extracts all the images from the PDF document
Dim streams() As Stream = documentExtractor.ExtractImages
'Extracts images from the specified range of pages in the PDF document
Dim stream() As Stream = documentExtractor.ExtractImages(2, 8)
' Release all resources used by the PDF document extractor.
documentExtractor.Dispose
Release all resources used by the PDF document extractor.
//Initialize the PDF document extractor
PdfDocumentExtractor documentExtractor = new PdfDocumentExtractor();
//Gets the number of pages present in the document
int pageCount = documentExtractor.PageCount;
//Loads a PDF document from a Stream.
documentExtractor.Load(fileStream);
// Extracts all the images from the PDF document
Stream[] streams = documentExtractor.ExtractImages();
//Extracts images from the specified range of pages in the PDF document
Stream[] stream = documentExtractor.ExtractImages(2, 8);
// Release all resources used by the PDF document extractor.
documentExtractor.Dispose();
'Initialize the PDF document extractor
Dim documentExtractor As PdfDocumentExtractor = New PdfDocumentExtractor
'Gets the number of pages present in the document
Dim pageCount As Integer = documentExtractor.PageCount
'Loads a PDF document from a Stream.
documentExtractor.Load(fileStream)
' Extracts all the images from the PDF document
Dim streams() As Stream = documentExtractor.ExtractImages
'Extracts images from the specified range of pages in the PDF document
Dim stream() As Stream = documentExtractor.ExtractImages(2, 8)
' Release all resources used by the PDF document extractor.
documentExtractor.Dispose
The GetResources API method retrieves the resources associated with a given PDF dictionary.
The ParseResources API method parses and extracts the resources associated with a given PDF dictionary.
The ParseTemplate API method parses and extracts the content of a PDF template.
The ParseImage API method parses and extracts the content of a PDF image
Updating SMask image reference by parsing xObject dictionary
Represents the PdfEan8 barcode.
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
//Creates a new PdfEan8Barcode.
PdfEan8Barcode barcode = new PdfEan8Barcode();
//Set the barcode text.
barcode.Text = "1234567";
barcode.Location = new PointF(100,100);
//Draw a barcode in the new Page.
barcode.Draw(page);
//Save the document to disk.
document.Save("Ean8Barcode.pdf");
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Creates a new page and adds it as the last page of the document
Dim page As PdfPage = document.Pages.Add()
'Creates a new PdfEan8Barcode.
Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
'Set the barcode text.
barcode.Text = "1234567"
barcode.Location = new PointF(100,100);
'Draw a barcode in the new Page.
barcode.Draw(page)
'Save the document to disk.
document.Save("Ean8Barcode.pdf")
Holds the barcode Information.
Initializes the new instance of
Generates an image for the barcode and returns it as a stream of data.
A stream containing the generated barcode image.
//Creates a new PdfEan8Barcode.
PdfEan8Barcode barcode = new PdfEan8Barcode();
//Set the barcode text.
barcode.Text = "1234567";
//Get the image for PdfEan8Barcode.
Image image= barcode.ToImage();
//Save the image into Disk
image.Save("PdfEan8.png", ImageFormat.Png);
'Creates a new PdfEan8Barcode.
Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
'Set the barcode text.
barcode.Text = "1234567"
'Get the image for PdfEan8Barcode.
Dim image As Image = barcode.ToImage()
'Save the image into Disk
image.Save("PdfEan8.png", ImageFormat.Png)
Encode the raw data using the EAN-8 algorithm.
Represents the PdfEan13 barcode.
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
//Creates a new PdfEan13Barcode.
PdfEan13Barcode barcode = new PdfEan13Barcode();
//Set the barcode text.
barcode.Text = "4006381333931";
barcode.Location = new PointF(100,100);
//Draw a barcode in the new Page.
barcode.Draw(page);
//Save the document to disk.
document.Save("Ean13Barcode.pdf");
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Creates a new page and adds it as the last page of the document
Dim page As PdfPage = document.Pages.Add()
'Creates a new PdfEan13Barcode.
Dim barcode As PdfEan13Barcode = New PdfEan13Barcode()
'Set the barcode text.
barcode.Text = "4006381333931"
barcode.Location = new PointF(100,100);
'Draw a barcode in the new Page.
barcode.Draw(page)
'Save the document to disk.
document.Save("Ean13Barcode.pdf")
Holds the barcode Information.
Initializes the new instance of
Generates an image for the barcode and returns it as a stream of data.
A stream containing the generated barcode image.
//Creates a new PdfEan13Barcode.
PdfEan13Barcode barcode = new PdfEan13Barcode();
//Set the barcode text.
barcode.Text = "4006381333931";
//Get the image for PdfEan13Barcode.
Image image= barcode.ToImage();
//Save the image into Disk
image.Save("PdfEan13.png", ImageFormat.Png);
'Creates a new PdfEan13Barcode.
Dim barcode As PdfEan13Barcode = New PdfEan13Barcode()
'Set the barcode text.
barcode.Text = "4006381333931"
'Get the image for PdfEan13Barcode.
Dim image As Image = barcode.ToImage()
'Save the image into Disk
image.Save("PdfEan13.png", ImageFormat.Png)
Represents the Pdf417 barcode.
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
//Creates a new Pdf417Barcode.
Pdf417Barcode pdf417Barcode = new Pdf417Barcode();
//Set the barcode text.
pdf417Barcode.Text = "012345678";
pdf417Barcode.Location = new PointF(100,100);
//Draw a barcode in the new Page.
pdf417Barcode.Draw(page);
//Save the document to disk.
document.Save("417Barcode.pdf");
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Creates a new page and adds it as the last page of the document
Dim page As PdfPage = document.Pages.Add()
'Creates a new Pdf417Barcode.
Dim pdf417Barcode As Pdf417Barcode = New Pdf417Barcode()
'Set the barcode text.
pdf417Barcode.Text = "012345678"
pdf417Barcode.Location = new PointF(100,100);
'Draw a barcode in the new Page.
pdf417Barcode.Draw(page)
'Save the document to disk.
document.Save("417Barcode.pdf")
Holds the barcode Information.
Gets or set the size of the barcode.
Gets or sets the error correction level.
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Creates a new Pdf417Barcode.
Pdf417Barcode pdf417Barcode = new Pdf417Barcode();
//Set text.
pdf417Barcode.Text = "012345678";
//Set barcode size.
pdf417Barcode.Size = new SizeF(200, 200);
//Set the error correction level.
pdf417Barcode.ErrorCorrectionLevel = Pdf417ErrorCorrectionLevel.Auto;
//Set the dimention of the barcode.
pdf417Barcode.XDimension = 3;
//Set the barcode location.
pdf417Barcode.Location = new PointF(100, 100);
//Draw the barcode to PDF page.
pdf417Barcode.Draw(page);
//Save document to disk.
document.Save("output.pdf");
//Close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Creates a new page and adds it as the last page of the document
Dim page As PdfPage = document.Pages.Add()
'Creates a new Pdf417Barcode.
Dim pdf417Barcode As New Pdf417Barcode()
'Set text.
pdf417Barcode.Text = "012345678"
'Set barcode size.
pdf417Barcode.Size = New SizeF(200, 200)
'Set the error correction level.
pdf417Barcode.ErrorCorrectionLevel = PdfErrorCorrectionLevel.High
'Set the dimention of the barcode.
pdf417Barcode.XDimension = 5
'Set the barcode location.
pdf417Barcode.Location = New PointF(100, 100)
'Draw the barcode to PDF page.
pdf417Barcode.Draw(page)
'Save document to disk.
document.Save("output.pdf")
'Close the document.
document.Close(True)
Generates an image for the barcode and returns it as a stream of data.
A stream containing the generated barcode image.
//Creates a new Pdf417Barcode.
Pdf417Barcode pdf417Barcode = new Pdf417Barcode();
//Set the barcode text.
pdf417Barcode.Text = "012345678";
//Get the image for Pdf417Barcode.
Image image= pdf417Barcode.ToImage();
//Save the image into Disk
image.Save("Pdf417.png", ImageFormat.Png);
'Creates a new Pdf417Barcode.
Dim pdf417Barcode As Pdf417Barcode = New Pdf417Barcode()
'Set the barcode text.
pdf417Barcode.Text = "012345678"
'Get the image for Pdf417Barcode.
Dim image As Image = pdf417Barcode.ToImage()
'Save the image into Disk
image.Save("Pdf417.png", ImageFormat.Png)
Holds the encoding.
Initialize a new instance of the class.
Generates an image for the barcode with the specified size and returns it as a stream of data.
The size of the image to generate.
A stream containing the generated barcode image.
PdfDataMatrixBarcode datamatrix = new PdfDataMatrixBarcode();
//Sets the barcode text.
datamatrix.Text = "Test";
//Set the dimention of the barcode.
datamatrix.XDimension = 5;
//Set the barcode location.
datamatrix.Location = new PointF(100, 100);
//Get the barcode as image.
Stream img = datamatrix.ToImage(new SizeF(200,200));
'Creates a new PDF datamatrix barcode.
Dim datamatrix As New PdfDataMatrixBarcode()
'Sets the barcode text.
datamatrix.Text = "Test"
'Set the dimention of the barcode.
datamatrix.XDimension = 5
'Set the barcode location.
datamatrix.Location = New PointF(100, 100)
'Get the barcode as image.
Dim img As Stream = datamatrix.ToImage(New SizeF(200,200))
Symbol attribute structure for the DataMatrix.
Holds the barcode Information.
Initialize a new instance of the class.
Gets or set the size of the barcode.
Gets or sets the logo image that will be displayed in the center of the QR barcode.
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Creates a new PDF QR barcode.
PdfQRBarcode qrBarcode = new PdfQRBarcode();
//Set text.
qrBarcode.Text = "012345678";
//Set barcode size.
qrBarcode.Size = new SizeF(200, 200);
//Set the logo image to QR barcode.
FileStream imageStream = new FileStream("logo.png", FileMode.Open, FileAccess.Read);
//Create QR Barcode logo.
QRCodeLogo qRCodeLogo = new QRCodeLogo(imageStream);
//Set the QR barcode logo.
qrBarcode.Logo = qRCodeLogo;
//Set the dimention of the barcode.
qrBarcode.XDimension = 5;
//Set the barcode location.
qrBarcode.Location = new PointF(100, 100);
//Draw the barcode to PDF page.
qrBarcode.Draw(page);
//Save document to disk.
document.Save("output.pdf");
//Close the document.
document.Close(true);
Represents the Base class for all the Single dimensional barcodes
Default bar width value.
Space count for barcode
Hold the barcode details
Initializes the new instance of
Generates an image for the barcode and returns it as a stream of data.
A stream containing the generated barcode image.
//Creates a new PdfCode11Barcode.
PdfCode11Barcode code11 = new PdfCode11Barcode();
//Set the barcode text.
code11.Text = "012345678";
//Get the image for Code32 Barcode.
Image image= code32.ToImage();
//Save the image into Disk
image.Save("Code32.png", ImageFormat.Png);
'Creates a new PdfCode11Barcode.
Dim code11 As PdfCode11Barcode = New PdfCode11Barcode()
'Set the barcode text.
code11.Text = "012345678"
'Get the image for Code32 Barcode.
Image image= code32.ToImage()
'Save the image into Disk
image.Save("Code32.png", ImageFormat.Png)
Generates an image for the barcode with the specified size and returns it as a stream of data.
The size of the image to generate.
A stream containing the generated barcode image.
//Creates a new PdfCode11Barcode.
PdfCode11Barcode code11 = new PdfCode11Barcode();
//Set the barcode text.
code11.Text = "012345678";
//Get the image for Code32 Barcode.
Image image= code32.ToImage(new SizeF(200,200));
//Save the image into Disk
image.Save("Code32.png", ImageFormat.Png);
'Creates a new PdfCode11Barcode.
Dim code11 As PdfCode11Barcode = New PdfCode11Barcode()
'Set the barcode text.
code11.Text = "012345678"
'Get the image for Code32 Barcode.
Image image= code32.ToImage(New SizeF(200,200))
'Save the image into Disk
image.Save("Code32.png", ImageFormat.Png)
Internal method used to paint bars on the image.
The graphics to draw.
The Rectangle.
Returns the right margin.
Extracts the pageResource from the page
Page whose resouce is needed
pageResource of the given page
Collects all the ExtendedGraphicsSatate elements in the pdf document
containing all the resources of the document
dictionary of ExtGState elements
Collects all the fonts in the page in a dictionary
dictionary containing all the resources in the Xobjects
dictionary containing font name and the font
Collects all the fonts in the page in a dictionary
dictionary containing all the resources in the page
page in which text is to be extracted
dictionary containing font name and the font
Collects all the images in the pdf document
containing all the resources of the document
dictionary of images
Updates the resources in the page
Existing page resources
Dictionary items to the updated
Updated page resource
The class provides methods and properties to access the PDF page resources.
Gets the PDF page resources.
Gets or sets the value associated with the key.
Returns if the FontCollection has same font face.
if font present true, else false
Initializes the new instance of the class
Adds the resource with the specified name.
Name of the resource
Resource to add
Returns if the key already exists.
if key present true,else false
The class represents the graphics state data.
Represents the image to PDF converter
Default positon of the image
Default size of the page
Holds that margin of the page
Gets or sets the position of the image
Gets or sets the size of the PDF page
Gets or sets the margin of the PDF page
Initializes the new instance of the image to PDF converter class
Get the page to draw the image
PDF document
The image
Draw the image using position of the page
The image
The page
Convert image to PDF document
The image stream
PDF document
Convert images to PDF Document
Collection of image streams
PDF document
Decodes the image stream in the PDF document into an image
Sets the fields associated with the TIFF image
Number of fields
Value of the field
Name of the TIFF tag
Type of the tag value
Writes the header to the TIFF image
Specifies the header of the TIFF image
Writes the list of fields associated with the TIFF image
List of TIFF fields
Writes short value into the TIFF stream
Short value to be written
Writes integer value into the TIFF stream
Integer value to be written
Structure of the TIFF header
Size of the byte order of the tiff image
TIFF version number
byte offset to first directory
Tag entry to the TIFF stream
Represents the TIFF tag
Represents the type of the TIFF tag
number of items; length in spec
byte offset to field data
Width of the image in pixels
Height of the image in pixels
Bits per channel (sample).
Compression technique
Photometric interpretation.
Offsets to data strips.
Samples per pixel.
Bytes counts for strips.
16-bit unsigned integer.
32-bit unsigned integer.
Display information found in this COD marker segment
Display information found in this COC marker segment
Display information found in this RGN marker segment
Decodes the ASCII85 encoded byte[]
encoded byte[]
decoded byte[]
asciihexdecode using our own implementation
white run lengths
black run lengths
Represents the extension class for rubber stamp annotation.
//Load the existing PDF file.
FileStream fileStream = new FileStream("input.pdf", FileMode.Open);
PdfLoadedDocument ldoc = new PdfLoadedDocument(fileStream);
//Get the existing PDF page.
PdfLoadedPage lpage = ldoc.Pages[0] as PdfLoadedPage;
//Get the rubber stamp annotation.
PdfLoadedRubberStampAnnotation rubberStampAnnotation = lpage.Annotations[0] as PdfLoadedRubberStampAnnotation;
//Get the custom image streams.
Stream[] imageStreams = rubberStampAnnotation.GetImages();
//Close the PDF document.
ldoc.Close(true);
Returns an array of Stream objects that represent the images associated with the rubber stamp annotation.
Rubber stamp annotation to get custom images.
An array of Stream objects that represent the images associated with the rubber stamp annotation.
//Load the existing PDF file.
FileStream fileStream = new FileStream("input.pdf", FileMode.Open);
PdfLoadedDocument ldoc = new PdfLoadedDocument(fileStream);
//Get the existing PDF page.
PdfLoadedPage lpage = ldoc.Pages[0] as PdfLoadedPage;
//Get the rubber stamp annotation.
PdfLoadedRubberStampAnnotation rubberStampAnnotation = lpage.Annotations[0] as PdfLoadedRubberStampAnnotation;
//Get the custom image streams.
Stream[] imageStreams = rubberStampAnnotation.GetImages();
//Close the PDF document.
ldoc.Close(true);
Represents the extension class for loaded signature field.
//Load the existing PDF file.
FileStream fileStream = new FileStream("input.pdf", FileMode.Open);
PdfLoadedDocument ldoc = new PdfLoadedDocument(fileStream);
//Get the existing signed signature field.
PdfLoadedSignatureField loadedSignature = ldoc.Forms.Fields[0] as PdfLoadedSignatureField;
//Get the image streams.
Stream[] imageStreams = loadedSignature.GetImages();
//Close the PDF document.
ldoc.Close(true);
Returns an array of Stream objects that represent the images associated with the signature field.
Signature field to get custom images.
An array of Stream objects that represent the images associated with the signature field.
//Load the existing PDF file.
FileStream fileStream = new FileStream("input.pdf", FileMode.Open);
PdfLoadedDocument ldoc = new PdfLoadedDocument(fileStream);
//Get the existing signed signature field.
PdfLoadedSignatureField loadedSignature = ldoc.Forms.Fields[0] as PdfLoadedSignatureField;
//Get the image streams.
Stream[] imageStreams = loadedSignature.GetImages();
//Close the PDF document.
ldoc.Close(true);
constant used in eexec and charset decode
constant used in eexec and charset decode
Represents the number of random bytes in stream to ignore
Variable to hold the glyph string and its glyph shapes
Variable to hold the character code and character
Variable to hold the font matrix
Variable to cff glyphs
needed so CIDFOnt0 can extend
Parse the difference encoding
Handle encoding for type1 fonts
parse the encoded part from a type 1 font
extract the subroutine data
Extract Font Data
extract bytestream with char data
Variable to hold the font matrix
Variable to cff glyphs
lookup table for names for type 1C glyphs
Lookup table to map values
lookup data to convert Expert values
Represents the compression options of the loaded document.
To know more about refer this link .
//Load an existing document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Initialize new instance of PdfCompressionOptions class.
PdfCompressionOptions options = new PdfCompressionOptions();
//set the compress images based on the image quality.
options.CompressImages = true;
//set the image quality.
options.ImageQuality = 50;
//set the optimize font.
options.OptimizeFont = true;
//set the optimize page contents.
options.OptimizePageContents = true;
//set the remove metadata informations.
options.RemoveMetadata = true;
ldoc.CompressionOptions = options;
//Save and close the document.
ldoc.Save("Output.pdf");
ldoc.Close(true);
'Load an existing document.
Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
'Initialize new instance of PdfCompressionOptions class.
Dim options As PdfCompressionOptions = New PdfCompressionOptions()
'set the compress images based on the image quality.
options.CompressImages = True
'set the image quality.
options.ImageQuality = 50
'set the optimize font.
options.OptimizeFont = True
'set the optimize page contents.
options.OptimizePageContents = True
'set the remove metadata informations.
options.RemoveMetadata = True
ldoc.CompressionOptions = options
'Save and Close the document.
ldoc.Save("Output.pdf")
ldoc.Close(True)
Indicates whether remove metadata.
Indicates compress the image objects based on the image quality.
Represents the image quality.
Indicates optimize the page content streams.
Indicates optimize the font data.
Gets or sets whether to remove metadata information.
//Load an existing document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Initialize new instance of PdfCompressionOptions class.
PdfCompressionOptions options = new PdfCompressionOptions();
//set the compress images based on the image quality.
options.CompressImages = true;
//set the image quality.
options.ImageQuality = 50;
//set the optimize font.
options.OptimizeFont = true;
//set the optimize page contents.
options.OptimizePageContents = true;
//set the remove metadata informations.
options.RemoveMetadata = true;
ldoc.CompressionOptions = options;
//Save and close the document.
ldoc.Save("Output.pdf");
ldoc.Close(true);
'Load an existing document.
Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
'Initialize new instance of PdfCompressionOptions class.
Dim options As PdfCompressionOptions = New PdfCompressionOptions()
'set the compress images based on the image quality.
options.CompressImages = True
'set the image quality.
options.ImageQuality = 50
'set the optimize font.
options.OptimizeFont = True
'set the optimize page contents.
options.OptimizePageContents = True
'set the remove metadata informations.
options.RemoveMetadata = True
ldoc.CompressionOptions = options
'Save and Close the document.
ldoc.Save("Output.pdf")
ldoc.Close(True)
Gets or sets whether to compress images based on the image quality.
//Load an existing document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Initialize new instance of PdfCompressionOptions class.
PdfCompressionOptions options = new PdfCompressionOptions();
//set the compress images based on the image quality.
options.CompressImages = true;
//set the image quality.
options.ImageQuality = 50;
//set the optimize font.
options.OptimizeFont = true;
//set the optimize page contents.
options.OptimizePageContents = true;
//set the remove metadata informations.
options.RemoveMetadata = true;
ldoc.CompressionOptions = options;
//Save and close the document.
ldoc.Save("Output.pdf");
ldoc.Close(true);
'Load an existing document.
Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
'Initialize new instance of PdfCompressionOptions class.
Dim options As PdfCompressionOptions = New PdfCompressionOptions()
'set the compress images based on the image quality.
options.CompressImages = True
'set the image quality.
options.ImageQuality = 50
'set the optimize font.
options.OptimizeFont = True
'set the optimize page contents.
options.OptimizePageContents = True
'set the remove metadata informations.
options.RemoveMetadata = True
ldoc.CompressionOptions = options
'Save and Close the document.
ldoc.Save("Output.pdf")
ldoc.Close(True)
//Load an existing document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Initialize new instance of PdfCompressionOptions class.
PdfCompressionOptions options = new PdfCompressionOptions();
//set the compress images based on the image quality.
options.CompressImages = true;
//set the image quality.
options.ImageQuality = 50;
//set the optimize font.
options.OptimizeFont = true;
//set the optimize page contents.
options.OptimizePageContents = true;
//set the remove metadata informations.
options.RemoveMetadata = true;
ldoc.CompressionOptions = options;
//Save and close the document.
ldoc.Save("Output.pdf");
ldoc.Close(true);
'Load an existing document.
Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
'Initialize new instance of PdfCompressionOptions class.
Dim options As PdfCompressionOptions = New PdfCompressionOptions()
'set the compress images based on the image quality.
options.CompressImages = True
'set the image quality.
options.ImageQuality = 50
'set the optimize font.
options.OptimizeFont = True
'set the optimize page contents.
options.OptimizePageContents = True
'set the remove metadata informations.
options.RemoveMetadata = True
ldoc.CompressionOptions = options
'Save and Close the document.
ldoc.Save("Output.pdf")
ldoc.Close(True)
Gets or sets whether to optimize page contents.
//Load an existing document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Initialize new instance of PdfCompressionOptions class.
PdfCompressionOptions options = new PdfCompressionOptions();
//set the compress images based on the image quality.
options.CompressImages = true;
//set the image quality.
options.ImageQuality = 50;
//set the optimize font.
options.OptimizeFont = true;
//set the optimize page contents.
options.OptimizePageContents = true;
//set the remove metadata informations.
options.RemoveMetadata = true;
ldoc.CompressionOptions = options;
//Save and close the document.
ldoc.Save("Output.pdf");
ldoc.Close(true);
'Load an existing document.
Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
'Initialize new instance of PdfCompressionOptions class.
Dim options As PdfCompressionOptions = New PdfCompressionOptions()
'set the compress images based on the image quality.
options.CompressImages = True
'set the image quality.
options.ImageQuality = 50
'set the optimize font.
options.OptimizeFont = True
'set the optimize page contents.
options.OptimizePageContents = True
'set the remove metadata informations.
options.RemoveMetadata = True
ldoc.CompressionOptions = options
'Save and Close the document.
ldoc.Save("Output.pdf")
ldoc.Close(True)
Gets or sets whether to optimize font data.
//Load an existing document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Initialize new instance of PdfCompressionOptions class.
PdfCompressionOptions options = new PdfCompressionOptions();
//set the compress images based on the image quality.
options.CompressImages = true;
//set the image quality.
options.ImageQuality = 50;
//set the optimize font.
options.OptimizeFont = true;
//set the optimize page contents.
options.OptimizePageContents = true;
//set the remove metadata informations.
options.RemoveMetadata = true;
ldoc.CompressionOptions = options;
//Save and close the document.
ldoc.Save("Output.pdf");
ldoc.Close(true);
'Load an existing document.
Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
'Initialize new instance of PdfCompressionOptions class.
Dim options As PdfCompressionOptions = New PdfCompressionOptions()
'set the compress images based on the image quality.
options.CompressImages = True
'set the image quality.
options.ImageQuality = 50
'set the optimize font.
options.OptimizeFont = True
'set the optimize page contents.
options.OptimizePageContents = True
'set the remove metadata informations.
options.RemoveMetadata = True
ldoc.CompressionOptions = options
'Save and Close the document.
ldoc.Save("Output.pdf")
ldoc.Close(True)
Represernts the PDF optimizer.
Indicates the optimization options.
Indicates the font references.
Indicates the image references.
Indicates the TTF font common table list
Collection holds used fonts in a page
The variable used to store the Optimized dictionary collection
Initialize the new instance of the class with input file name.
Input file name.
Optimize the PDF document
Close the optimizer
Optimze the annotations content streams.
Check page resoucres contains identical resoucres
optimize the Apperance dictionary.
Optimize the page resources (font, image, xobject contents).
Optimize the page content.
Optimize the content stream.
Trim the operand if contains .00
Remove the meta data entry
Optimize all the PDF resources
Optimize the font data
optimize the image
Create a font stream by using used characters
Add font used text in a collection
Get the image interpolation.
Optimize the PDF true type font
optimize the type 0 font
Get the local table last index
Optimize type0 font
Update the existing font data
Set the font tables.
Update the embedded subset font Name based on the PDF specification.
Get the object from parent dictionary
Get the object from IPdfPrimitive
Calulates the check sum value.
Get the font table entry.
calculate the local and hmtx table length.
Create hash from the current stream and returns true if present in the collection
Create hash value from the current stream
Find Adobe standard Latin characters
Represents a class that can be used to convert Tiff image to another image format.
Converts Tiff image stream to Png image stream.
Represents the Tiff stream to be converted.
Returns the converted Png stream.
Gets or sets a value of the StrokingColorspace
Gets or sets a value of the NonStrokingColorspace
Gets or sets a value of the StrokingBrush
Gets or sets a value of the NonStrokingBrush
Gets or sets the value that indicating the extracting of text data.
Renders the Text to the panel
graphics element
location in which the graphics is to be drawn
Removes the escape sequence characters in the given text
text with the escape sequence
Text without escape sequence