GroupDocsGists
10/19/2017 - 11:08 AM

Documents-ExtractArtifactInformation.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As PdfDocument = Document.Load(Of PdfDocument)(Utilities.MapSourceFilePath(FilePath))
    For Each page As PdfPage In doc.Pages
        For Each artifact As PdfArtifact In page.Artifacts
            Console.WriteLine(artifact.ArtifactType)
            Console.WriteLine(artifact.ArtifactSubtype)
            If artifact.Image IsNot Nothing Then
                Console.WriteLine(artifact.Image.Width)
                Console.WriteLine(artifact.Image.Height)
                Console.WriteLine(artifact.Image.GetBytes().Length)
            End If
            Console.WriteLine(artifact.Text)
            Console.WriteLine(artifact.Opacity)
            Console.WriteLine(artifact.X)
            Console.WriteLine(artifact.Y)
            Console.WriteLine(artifact.Width)
            Console.WriteLine(artifact.Height)
            Console.WriteLine(artifact.RotateAngle)
        Next
    Next
End Using