2017-02-24 84 views
1

我想使用bytescout将多个pdf文件转换为excel pdf提取器任何人都可以帮助我。我能够提取单个PDF文件。 但是,我正在为多个文件做错误。vb.net将多个PDF文件转换为Excel使用Bytescout pdf提取器

这是我得到的错误。

enter image description here

这里是我的代码。

Imports System.Threading 
    Imports Bytescout.PDFExtractor 
    Imports System.IO 

    Module Module1 

    Sub Main() 


     Try 

      Dim extractor As New CSVExtractor() 
      extractor.RegistrationName = "demo" 
      extractor.RegistrationKey = "demo" 

      'Dim filenames1 As String() = Directory.GetFiles(Path, "*.TXT") 
      For Each f In Directory.GetFiles(My.Computer.FileSystem.CurrentDirectory & "\PDF Files\", "*.PDF", SearchOption.TopDirectoryOnly) 

       extractor.LoadDocumentFromFile(f) 


       extractor.SaveCSVToFile(My.Computer.FileSystem.CurrentDirectory & "\CSV Files\"(f)) 

       Console.WriteLine("Data has been extracted to CSV file....!" & Environment.NewLine) 

      Next 

      Thread.Sleep(3000) 

     Catch error_t As Exception 
      Console.WriteLine(error_t.ToString) 
      Console.ReadKey(True) 
     End Try 


    End Sub 

End Module 
+1

创建它们什么是错误? –

+0

请阅读[问]并参加[导览]。 “我得到错误”对我们并不是很有用;问题必须包括问题中的实际错误文本,需要一些努力来解决问题并提出实际问题。 – Plutonix

回答

0

根据错误信息the given path's format is not supported请你确认是输出路径是正确的?如果路径文件夹或子文件夹不存在,则应先使用System.IO.Directory.CreateDirectory