ByteScout PDF Extractor SDK - VB6 - PDF To XML - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF Extractor SDK – VB6 – PDF To XML

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VB6 – PDF To XML

ByteScout PDF Extractor SDK – VB6 – PDF To XML

Form1.frm

VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "PDF to XML"
   ClientHeight    =   1095
   ClientLeft      =   120
   ClientTop       =   465
   ClientWidth     =   3675
   LinkTopic       =   "Form1"
   ScaleHeight     =   1095
   ScaleWidth      =   3675
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmd_pdf_to_xml 
      Caption         =   "Convert PDF to XML"
      Height          =   855
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3495
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmd_pdf_to_xml_Click()
    
    ' Hanlde Error
    On Error GoTo ErrorHandler:
    
    ' Create Bytescout.PDFExtractor.XMLExtractor object
    Set extractor = CreateObject("Bytescout.PDFExtractor.XMLExtractor")
    
    ' Set Registration name and key
    extractor.RegistrationName = "demo"
    extractor.RegistrationKey = "demo"
  
    ' Load sample PDF document
    extractor.LoadDocumentFromFile "sample.pdf"
    
    ' Peform Save to XML file
    extractor.SaveXMLToFile "output.xml"
    
    ' Show Success Message
    MsgBox "Extracted data saved to 'output.xml' file.", vbInformation, "Success"
    
    ' Close form
    Unload Me
    
ErrorHandler:
If Err.Number <> 0 Then
    MsgBox Err.Description, vbInformation, "Error"
End If

End Sub


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next