|
|
Matlab: Save pdf as txt?
Hello all,
I'd like to use Matlab to save the contents of a pdf as a txt-file. The procedure as it is implemeted is to use "actxserver('Excel.Application');" and start an Excel-macro that in turn opens the pdf and saves its contents as txt:
----- VBA Code -----
Dim AcroXApp As Object
Dim AcroXAVDoc As Object
Dim AcroXPDDoc As Object
Dim jsObj As Object
Set AcroXApp = CreateObject("AcroExch.App")
AcroXApp.Hide
Set AcroXAVDoc = CreateObject("AcroExch.AVDoc")
AcroXAVDoc.Open FSOFile, "Acrobat"
AcroXAVDoc.BringToFront
Set AcroXPDDoc = AcroXAVDoc.GetPDDoc
Set jsObj = AcroXPDDoc.GetJSObject
jsObj.SaveAs SaveDir, "com.adobe.acrobat.plain-text"
----------
I have tried to do this in Matlab:
----- m Code -----
AVDoc = actxserver('AcroExch.AVDoc');
AVDoc.Open(fileName, 'Acrobat');
AVDoc.BringToFront;
PDDoc = AVDoc.GetPDDoc;
JSObject = PDDoc.GetJSObject;
----------
I get to the point where I have a JSObject in Matlab, but I do not know how to save it. There seems to be no equivalent method that does what [jsObj.SaveAs SaveDir, "com.adobe.acrobat.plain-text"] does.
Some advice would be very much appreciated!
Thanks,
Alexander
|
|
0
|
|
|
|
Reply
|
Alexander
|
7/1/2010 12:33:05 PM |
|
"Alexander Schulz" wrote in message <i0i1u1$lh8$1@fred.mathworks.com>...
> Hello all,
>
> I'd like to use Matlab to save the contents of a pdf as a txt-file. The procedure as it is implemeted is to use "actxserver('Excel.Application');" and start an Excel-macro that in turn opens the pdf and saves its contents as txt:
>
> ----- VBA Code -----
>
> Dim AcroXApp As Object
> Dim AcroXAVDoc As Object
> Dim AcroXPDDoc As Object
> Dim jsObj As Object
>
> Set AcroXApp = CreateObject("AcroExch.App")
> AcroXApp.Hide
>
> Set AcroXAVDoc = CreateObject("AcroExch.AVDoc")
> AcroXAVDoc.Open FSOFile, "Acrobat"
> AcroXAVDoc.BringToFront
>
> Set AcroXPDDoc = AcroXAVDoc.GetPDDoc
> Set jsObj = AcroXPDDoc.GetJSObject
>
> jsObj.SaveAs SaveDir, "com.adobe.acrobat.plain-text"
>
> ----------
>
> I have tried to do this in Matlab:
>
> ----- m Code -----
>
> AVDoc = actxserver('AcroExch.AVDoc');
> AVDoc.Open(fileName, 'Acrobat');
> AVDoc.BringToFront;
>
> PDDoc = AVDoc.GetPDDoc;
>
> JSObject = PDDoc.GetJSObject;
>
> ----------
>
> I get to the point where I have a JSObject in Matlab, but I do not know how to save it. There seems to be no equivalent method that does what [jsObj.SaveAs SaveDir, "com.adobe.acrobat.plain-text"] does.
>
> Some advice would be very much appreciated!
>
> Thanks,
> Alexander
Anyone solved the above problem? If so, I would highly appreciate it if you could tell me how to save the PDF.
Thank you,
Rami Skaik
|
|
0
|
|
|
|
Reply
|
r_skeik (12)
|
9/22/2011 8:19:26 PM
|
|
|
1 Replies
399 Views
(page loaded in 0.055 seconds)
Similiar Articles: Matlab: Save pdf as txt? - comp.soft-sys.matlabHello all, I'd like to use Matlab to save the contents of a pdf as a txt-file. The procedure as it is implemeted is to use "actxserver('Excel.Appli... How to read a text (txt) file, modify and save - comp.soft-sys ...Matlab: Save pdf as txt? - comp.soft-sys.matlab How to read a text (txt) file, modify and save - comp.soft-sys ... Reader to read an external text file and ... How to save text and numerical matrix in one txt file - comp.soft ...Matlab: Save pdf as txt? - comp.soft-sys.matlab TMG text to matrix generator - comp.soft-sys.matlab Matlab: Save pdf as txt? - comp.soft-sys.matlab How to save text and ... Text File With Header - comp.soft-sys.matlabReading a Header txt file - comp.soft-sys.matlab Matlab: Save pdf as txt? - comp.soft-sys.matlab Matlab: Save pdf as txt? - comp.soft-sys.matlab Reading a Header txt file ... Please help me produce a nice .eps or .pdf using pcolor - comp ...Matlab: Save pdf as txt? - comp.soft-sys.matlab Please help me produce a nice .eps or .pdf using pcolor - comp ... The figure that Matlab produces looks great, but once I ... Display resolution, structure, color space of PDF file - comp.text ...Matlab: Save pdf as txt? - comp.soft-sys.matlab Display resolution, structure, color space of PDF file - comp.text ... Matlab: Save pdf as txt? - comp.soft-sys.matlab ... Reading a Header txt file - comp.soft-sys.matlabMatlab: Save pdf as txt? - comp.soft-sys.matlab Matlab: Save pdf as txt? - comp.soft-sys.matlab Reading a Header txt file - comp.soft-sys.matlab How to read a text (txt ... Text-to-speech in MATLAB - comp.soft-sys.matlabMatlab: Save pdf as txt? - comp.soft-sys.matlab Text File script writes down the form response in a text file. Easy PDF to Text ... Is it possible to do real time speech ... Acrobat 5.05 javascript read txt file? - comp.text.pdfAcrobat 5.05 javascript read txt file? - comp.text.pdf... Reader to read an external text file and ... Matlab: Save pdf as txt? - comp.soft-sys.matlab Reading a Header ... AcroExch.PDDoc open from URL - comp.text.pdfMatlab: Save pdf as txt? - comp.soft-sys.matlab AcroExch.PDDoc open from URL - comp.text.pdf Matlab: Save pdf as txt? - comp.soft-sys.matlab Set AcroXAVDoc = CreateObject ... Matlab: Save pdf as txt? - Newsreader - MATLAB CentralFile exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community Matlab: Save pdf as txt? - comp.soft-sys.matlab | Computer GroupHello all, I'd like to use Matlab to save the contents of a pdf as a txt-file. The procedure as it is implemeted is to use "actxserver('Excel.Appli... 7/23/2012 10:00:32 PM
|
|
|
|
|
|
|
|
|