shell() and pdftotext

Hillen Richard mail at richard-hillen.de
Sun Jan 12 14:53:21 EST 2020


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.


More information about the use-livecode mailing list