shell() and pdftotext

Phil Davis phil at pdslabs.net
Sun Jan 12 20:48:09 EST 2020


To find the full path, this may work - open Terminal and type:

     which pdftotext

and it should display the path to the copy of pdftotext that the OS runs 
when you type the 'pdftotext' command.

Phil Davis


On 1/12/20 2:00 PM, Brian Milby via use-livecode wrote:
> My guess is that shell can’t find your executable.  Try using full paths.
>
> Thanks,
> Brian
> On Jan 12, 2020, 2:54 PM -0500, Hillen Richard via use-livecode <use-livecode at lists.runrev.com>, wrote:
>> Hello,
>>
>> I want to extract .txt from a pdf-file using Livecode 9.5 on macOS Catalina.
>>
>> Therefore I installed from http://www.xpdfreader.com/
>> the xpdf-tools-mac-4.02
>> and using the Terminal with „pdftotext /Users/hillen/Desktop/inter.pdf“
>> I get a clean text-file inter.txt. Wonderful!
>>
>> So I hopefully wrote in Livecode:
>>
>> ——————
>> put "/users/hillen/Desktop/inter.pdf" into fn
>> put "pdftotext " & fn into Kommando
>>
>> if there is not a file fn then
>> answer „no SourceFile!"
>> exit to top
>> end if
>>
>> get shell(quote & Kommando & quote)
>>
>> answer it & return & the result
>> ——————
>>
>> But extracting doesn´t work and I get the answer:
>>
>> /bin/sh: line 1: pdftotext /users ……pdf: No such file or directory
>>
>> and the result ist 127.
>>
>>
>>
>> Typing to Terminal „pdftotext“ I get a List with command-options.
>>
>> With
>> get shell(„pdftotext“) with and without quotes
>>
>> I get the answer „/bin/sh: line 1: pdftotext: command not found“
>>
>>
>>
>> What is wrong? May you please help?
>>
>> Richard.
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

-- 
Phil Davis
503-307-4363





More information about the use-livecode mailing list