Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF Suite for convert pdf to xml with images with pdf extractor sdk below and use it in your application. Simply copy and paste in your VB.NET project or application you and then run your app! Use of ByteScout PDF Suite in VB.NET is also described in the documentation included along with the product.
Our website gives trial version of ByteScout PDF Suite for free. It also includes documentation and source code samples.
Imports Bytescout.PDFExtractor Namespace PDF2XML Class Program Shared Sub Main(ByVal args As String()) ' Create Bytescout.PDFExtractor.XMLExtractor instance Dim extractor As New XMLExtractor() extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile("sample1.pdf") ' Uncomment this line to get rid of empty nodes in XML 'extractor.PreserveFormattingOnTextExtraction = False ' Set output image format extractor.ImageFormat = OutputImageFormat.PNG ' Save images to external files extractor.SaveImages = ImageHandling.OuterFile extractor.ImageFolder = "images" ' Folder for external images extractor.SaveXMLToFile("result_with_external_images.xml") ' Embed images into XML as Base64 encoded string extractor.SaveImages = ImageHandling.Embed extractor.SaveXMLToFile("result_with_embedded_images.xml") ' Cleanup extractor.Dispose() End Sub End Class End Namespace