Foxtable(狐表)用户栏目专家坐堂 → PDF数据处理请教


  共有7122人关注过本帖平板打印复制链接

主题:PDF数据处理请教

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/7/24 18:20:00 [只看该作者]

mark 提取pdf图片

 

需要的dll

 

http://pan.baidu.com/s/1i5FpQvV

 

 

调用的代码

 

Dim doc As org.apache.pdfbox.pdmodel.PDDocument = Nothing
Try
    doc = org.apache.pdfbox.pdmodel.PDDocument.load("d:\test.pdf")
    Dim pages = doc.getDocumentCatalog().getAllPages()
    Dim i As Integer = 1
    For Each page As object In pages
        Dim resources = page.getResources()
        Dim imgs = resources.getImages()
        If imgs IsNot Nothing Then
            For Each key As object In imgs.keySet
                imgs.get(key).write2file("d:\image" & i)
                i += 1
            Next
        End If
    Next
    msgbox("OK")
catch ex As exception
    msgbox(ex.message)
Finally
    If doc IsNot Nothing Then
        doc.close()
    End If
End Try


 回到顶部
总数 12 1 2 下一页