Link Search Menu Expand Document

Extract Attachments from PDF - VBScript

PDF Extractor SDK sample in VBScript demonstrating ‘Extract Attachments from PDF’

' Create Bytescout.PDFExtractor.extractor object
Set extractor = CreateObject("Bytescout.PDFExtractor.AttachmentExtractor")
extractor.RegistrationName = "demo"
extractor.RegistrationKey = "demo"

' Load sample PDF document with embedded attachments

' Iterate through attachments and save them
For i = 0 To extractor.Count - 1
    ' Save file to current folder with original name
    extractor.Save i, extractor.GetFileName(i)

MsgBox "Done: " & CStr(extractor.Count) & " attachments extracted"

Set extractor = Nothing

Download Source Code (.zip)

Return to the previous page Explore PDF Extractor SDK