MACSCRPT Archives

September 2015

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Steele <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 1 Sep 2015 21:48:28 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
> On Sep 1, 2015, at 5:07 PM, Deivy Petrescu <[log in to unmask]> wrote:
> 
>> On Sep 1, 2015, at 14:27 , SUBSCRIBE MACSCRPT Inyo55 <[log in to unmask]> wrote:
>> 
>> Using OSX Yosemite.
>> I installed the PDFTOTEXT unix shell program and it works fine.....it converts non-bitmap PDF files to TEXT files.
>> 
>> I am trying to take the result of this conversion.....the Text file.....and use it in the next step of my Applescript.
>> 
>> Here is what I have for the conversion part:
>> 
>>  set myfile to choose file with prompt "Choose PDF to convert to TEXT"
>> 
>>  set myfile to myfile as alias
>> 
>>  do shell script "/usr/local/bin/pdftotext " & quoted form of POSIX path of myfile
>> 
>> The above creates the text file and puts it in the directory from where the pdf file was chosen, but I cannot "grab" the text file to use it in the next step, which is a grep search.
>> 
>> I tried to set an object for the result:
>> 
>>  set mytextfile to do shell script "/usr/local/bin/pdftotext " & quoted form of POSIX path of myfile
>> 
>> This did not work, nothing was returned.  Any suggestions?
>> 
>> thanks,
>> Bob Rutledge
> 
> Did you try Skim?
> It is free and scriptable.
> I believe Smile also reads pdf, I used to create pdf all the time.
> 
> Deivy Petrescu
> [log in to unmask]

Maybe should mention that Acrobat will save as text, although the dictionary is obscure.


Bill Steele
[log in to unmask]

ATOM RSS1 RSS2