Guest User

Untitled

a guest
Jul 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Sub Main()
  2. Dim pathToPdf As String = "D:File.pdf"
  3. Dim pathToWord As String = "D:Result.rtf"
  4.  
  5. 'Convert PDF file to Word file
  6. Dim f As New SautinSoft.PdfFocus()
  7.  
  8. f.OpenPdf(pathToPdf)
  9.  
  10. If f.PageCount > 0 Then
  11. Dim result As Integer = f.ToWord(pathToWord)
  12.  
  13. 'Show Word document
  14. If result = 0 Then
  15. System.Diagnostics.Process.Start(pathToWord)
  16. End If
  17. End If
  18. End Sub
  19.  
  20. Dim doc As PDFDoc = New PDFDoc("my.pdf")
  21. Dim txt As TextExtractor = New TextExtractor
  22. txt.Begin(doc.GetPage(1))
  23. Console.WriteLine(txt.GetAsText())
Add Comment
Please, Sign In to add comment