读取将pdf文档扫描到VB.NET中的文本文件 [英] read Scan pdf document to text file in VB.NET

查看:91
本文介绍了读取将pdf文档扫描到VB.NET中的文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从图纸扫描的pdf文件.而且我想将其转换为文本格式或文本文件的pdf文件.那么如何在VB.NET中实现呢?

I have a pdf file which scanned from a the drawing. And I want to convert it to pdf file with text format or text file.so How can I do that in VB.NET?

推荐答案

购买购买PDF库,如果您的PDF是扫描文件,那么还可以使用OCR库.

.NET中没有内置支持OCR或与PDF相关的内容.
Buy buying a PDF library, and if your PDF is a scan, an OCR library also.

There is no built in support for OCR or anything to do with PDFs in .NET.


如果是文本格式,我将其读取为文本文件,但无法进行扫描.我尝试在VB.NET中使用itextshap库进行读取,但结果为false.希望任何人都可以帮助我解决此问题!
if it is text format,I readed it to text file but with scan fromat I can''t. I tried using itextshap library in VB.NET to read but false.I hope that anybody can help me resolve this problem!


< pre>< pre lang ="vb">
Public Sub SubFoldersRecursive(ByVal根为DirectoryInfo,ByRef状态为字符串)
试试
状态+ = Root.FullName + vbNewLine
如果(Root.GetDirectories.Length< = 0)然后
退出子
如果结束
昏暗的SD作为DirectoryInfo
对于Root.GetDirectories中的每个SD
SubFoldersRecursive(SD,Status)
下一个
异常捕获
状态+ =例如消息+ vbNewLine
结束尝试
结束子
''非递归函数可查找所有子目录名称
公共子子文件夹(ByVal根为DirectoryInfo,ByRef状态为字符串)
Dim Dir作为DirectoryInfo
状态+ = Root.FullName + vbNewLine
对于Root.GetDirectories("*",SearchOption.AllDirectories)中的每个目录
状态+ = Dir.FullName + vbNewLine
下一个
结束子




</pre></pre>
<pre><pre lang="vb">
Public Sub SubFoldersRecursive(ByVal Root As DirectoryInfo, ByRef Status As String)
Try
Status += Root.FullName + vbNewLine
If (Root.GetDirectories.Length <= 0) Then
Exit Sub
End If
Dim SD As DirectoryInfo
For Each SD In Root.GetDirectories
SubFoldersRecursive(SD, Status)
Next
Catch ex As Exception
Status += ex.Message + vbNewLine
End Try
End Sub
''NON-Recursive Function To Find All SubDirectory Names
Public Sub SubFolders(ByVal Root As DirectoryInfo, ByRef Status As String)
Dim Dir As DirectoryInfo
Status += Root.FullName + vbNewLine
For Each Dir In Root.GetDirectories("*", SearchOption.AllDirectories)
Status += Dir.FullName + vbNewLine
Next
End Sub




</pre></pre>


这篇关于读取将pdf文档扫描到VB.NET中的文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆