These sample source codes on this page below are displaying how to extract attachments from pdf with pdf extractor sdk in VB.NET. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK and you can use it to extract attachments from pdf with pdf extractor sdk with VB.NET.
Want to quickly learn? This fast application programming interfaces of ByteScout Data Extraction Suite for VB.NET plus the guidelines and the code below will help you quickly learn how to extract attachments from pdf with pdf extractor sdk. Follow the instructions from scratch to work and copy the VB.NET code. Further improvement of the code will make it more robust.
Our website gives trial version of ByteScout Data Extraction Suite for free. It also includes documentation and source code samples.
Imports Bytescout.PDFExtractor Module Module1 Sub Main() ' Create Bytescout.PDFExtractor.AttachmentExtractor instance Dim extractor = New AttachmentExtractor() extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile(".\attachments.pdf") For i As Integer = 0 To extractor.Count - 1 Console.WriteLine("Saving attachment: " + extractor.GetFileName(i)) ' Save attachment to file extractor.Save(i, extractor.GetFileName(i)) Console.WriteLine("File size: " + extractor.GetSize(i).ToString()) Next ' Cleanup extractor.Dispose() End Sub End Module