''' <summary>
''' Prints information about image-resources of PDF document.
''' </summary>
''' <param name="pdfFilename">The filename of PDF document.</param>
Public Shared Sub GetPdfImagesInfo(pdfFilename As String)
' open PDF document
Using document As New Vintasoft.Imaging.Pdf.PdfDocument(pdfFilename)
' get collection of image-resources of PDF document
Dim images As Vintasoft.Imaging.Pdf.Tree.PdfImageResource() = document.GetImages()
' print count of image-resource
System.Console.WriteLine("Images count: {0}", images.Length)
' for each image-resource
For Each image As Vintasoft.Imaging.Pdf.Tree.PdfImageResource In images
' print information about image-resource
System.Console.WriteLine(vbTab & "{0,4}x{1,-4} {2,5}bpp {3}", image.Width, image.Height, image.BitsPerPixel, image.Compression)
Next
End Using
End Sub
' This code example produces the following output:
Images count: 11
189x41 24bpp Jpeg
120x50 24bpp Jpeg
122x56 24bpp Jpeg
143x41 24bpp Jpeg
216x21 24bpp Jpeg
106x49 8bpp Zip
209x30 24bpp Jpeg
189x24 24bpp Jpeg
122x42 24bpp Jpeg
5x7 24bpp Zip
817x292 24bpp Jpeg