-1

嗨,我有一个 pdf 文件(路径),我想将其转换为 excel 文件。我用的是福昕魅影。我已经将 api 手册用于参考,但我无法弄清楚。( http://cdn01.foxitsoftware.com/pub/foxit/manual/phantom/en_us/API%20Reference%20for%20Application%20Communication.pdf ) 该文件只是一个带有随机值的 pdf。我有图书馆 PhantomPDF

Sub convert()

Dim phApp As PhantomPDF.Application
Set phApp = CreateObject("PhantomPDF.Application")
Dim phCreator As PhantomPDF.Document
Set phCreator = phApp.CurrentDocument
Dim hresult As Variant
Dim path As String
path = "C:\Users\plfournier\Documents\test.pdf"

hresult = phCreator.OCRAndExportToExcel(path, 1, 1, True)

End Sub
4

1 回答 1

0
Sub convert()

    Dim phApp As PhantomPDF.Application

    Dim phCreator As PhantomPDF.Document
    Dim hresult As Variant
    Dim path As String

    Set phApp = CreateObject("PhantomPDF.Application")
    Set phCreator = phApp.CurrentDocument
    path = "C:\Users\39340\Downloads\90-21 DN16 CONTACT.xls"

    phCreator.OCRAndExportToExcel path, 1, 1, True, True

End Sub
于 2021-06-15T15:40:23.843 回答