Error processing SSI file
LEADTOOLS PDF (Leadtools.Pdf assembly)

Show in webframe

Images Property






Gets a list of the embedded images of this PDFDocument.
Syntax
public IList<PDFImage> Images {get;}
'Declaration
 
Public ReadOnly Property Images As IList(Of PDFImage)
'Usage
 
Dim instance As PDFDocument
Dim value As IList(Of PDFImage)
 
value = instance.Images
public List<PDFImage> getImages()
public:
property IList<PDFImage>^ Images {
   IList<PDFImage>^ get();
}

Property Value

A list of PDFImage contained in this PDFDocument.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Controls
Imports Leadtools.Pdf
Imports Leadtools.Svg
Imports Leadtools.WinForms

<TestMethod> _
Public Sub PDFDocumentImagesExample()
  Dim pdfFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "Leadtools.pdf")
  Dim txtFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "LEAD_pdfImageInfo.txt")
  ' Save the results to the text file for examining
  Using writer As StreamWriter = File.CreateText(txtFileName)
    Using document As PDFDocument = New PDFDocument(pdfFileName)
       ' Look for image objects within the PDF
       document.ParseDocumentStructure(PDFParseDocumentStructureOptions.Images)

       ' Output information about each image
       For Each pdfImage As PDFImage In document.Images
         WritePdfImageProperties(writer, pdfImage)
       Next pdfImage
    End Using
  End Using
End Sub

Public Sub WritePdfImageProperties(ByVal writer As StreamWriter, ByVal image As PDFImage)
  writer.WriteLine("PDFImage.PageNumber: {0}", image.PageNumber.ToString())
  writer.WriteLine("  PDFImage.ObjectNumber: {0}", image.ObjectNumber.ToString())
  writer.WriteLine("  PDFImage.ColorDevice: {0}", image.ColorDevice.ToString())
  writer.WriteLine("  PDFImage.StreamOffset: {0}", image.StreamOffset.ToString())
  writer.WriteLine("  PDFImage.StreamLength: {0}", image.StreamLength.ToString())
  writer.WriteLine("  PDFImage.BitsPerComponent: {0}", image.BitsPerComponent.ToString())
  writer.WriteLine("  PDFImage.ComponentCount: {0}", image.ComponentCount.ToString())
  writer.WriteLine("  PDFImage.BitsPerPixel: {0}", image.BitsPerPixel.ToString())
  writer.WriteLine("  PDFImage.Width: {0}", image.Width.ToString())
  writer.WriteLine("  PDFImage.Height: {0}", image.Height.ToString())
  writer.WriteLine("  PDFImage.ImageType: {0}", image.ImageType.ToString())
End Sub

Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Pdf;
using Leadtools.Svg;
using Leadtools.WinForms;

[TestMethod]
public void PDFDocumentImagesExample()
{
   string pdfFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf");
   string txtFileName = Path.Combine(LEAD_VARS.ImagesDir, @"LEAD_pdfImageInfo.txt");
   // Save the results to the text file for examining
   using (StreamWriter writer = File.CreateText(txtFileName))
      using (PDFDocument document = new PDFDocument(pdfFileName))
      {
         // Look for image objects within the PDF
         document.ParseDocumentStructure(PDFParseDocumentStructureOptions.Images);

         // Output information about each image
         foreach (PDFImage pdfImage in document.Images)
            WritePdfImageProperties(writer, pdfImage);
      }
}

public void WritePdfImageProperties(StreamWriter writer, PDFImage image)
{
   writer.WriteLine("PDFImage.PageNumber: {0}", image.PageNumber.ToString());
   writer.WriteLine("  PDFImage.ObjectNumber: {0}", image.ObjectNumber.ToString());
   writer.WriteLine("  PDFImage.ColorDevice: {0}", image.ColorDevice.ToString());
   writer.WriteLine("  PDFImage.StreamOffset: {0}", image.StreamOffset.ToString());
   writer.WriteLine("  PDFImage.StreamLength: {0}", image.StreamLength.ToString());
   writer.WriteLine("  PDFImage.BitsPerComponent: {0}", image.BitsPerComponent.ToString());
   writer.WriteLine("  PDFImage.ComponentCount: {0}", image.ComponentCount.ToString());
   writer.WriteLine("  PDFImage.BitsPerPixel: {0}", image.BitsPerPixel.ToString());
   writer.WriteLine("  PDFImage.Width: {0}", image.Width.ToString());
   writer.WriteLine("  PDFImage.Height: {0}", image.Height.ToString());
   writer.WriteLine("  PDFImage.ImageType: {0}", image.ImageType.ToString());
}

static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Requirements

Target Platforms

See Also

Reference

PDFDocument Class
PDFDocument Members

Error processing SSI file
   Leadtools.Pdf requires a PDF Pro, Pro Suite, Document, or Medical license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features