PageExtractDrawings Method

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET
Extracts vector drawings and images from page as INumerable containing ImageInfo instances. Text will be ignored. For text extraction use ExtractText(TextExtractionOptions, Boolean).

Namespace:  Apitron.PDF.Kit.FixedLayout
Assembly:  Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: 2.0.37.0 (2.0.37.0)
Syntax

public IEnumerable<ImageInfo> ExtractDrawings(
	Resolution desiredResolution = null
)

Parameters

desiredResolution (Optional)
Type: Apitron.PDF.Kit.ConfigurationResolution
Desired resoulution of the extracted drawings.

Return Value

Type: IEnumerableImageInfo
Drawings as ImageInfo instances.
Examples

C#
foreach (ImageInfo imageInfo in page.ExtractDrawingLayer(new Resolution(96, 96)))
{
   using (FileStream imagestream = new FileStream(Path.Combine(pageFolder, string.Format("{0}.bmp", drawingIndex++)), FileMode.Create, FileAccess.ReadWrite))
   {
      imageInfo.SaveToBitmap(imagestream);
   }
}
See Also

Reference