pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Levi <drjle...@aol.com>
Subject Re: Shell Can't Find pdfbox
Date Sat, 07 Nov 2015 22:57:47 GMT
Well, that does work, although it appears to be a different method than what the Apache PDFBox
documentation specifies. Thank you! JL
 

 

 

-----Original Message-----
From: Maruan Sahyoun <sahyoun@fileaffairs.de>
To: users <users@pdfbox.apache.org>
Sent: Sat, Nov 7, 2015 12:36 pm
Subject: Re: Shell Can't Find pdfbox


Hi,

> Am 07.11.2015 um 17:30 schrieb Jonathan Levi <drjlevi6@aol.com>:
> 
>

> Tilman and Andreas,
> 
> Thank you for your help. Unfortunately, I can't
make either suggestion work:
> 
> Tilman: I don't think the problem is a
missing $PATH entry. My pdfbox-app-1.8.10.jar is in /usr/local/bin:
> 
>
jonathan$ ls /usr/local/bin/pdfbox-app-1.8.10.jar
>
/usr/local/bin/pdfbox-app-1.8.10.jar
> 
> This is in $PATH:
> 
> jonathan$
echo $PATH
>
/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:.:/Users/jonathan/bin:/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Internet
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin
> 
> 
> 
> Andreas: To
eliminate as much uncertainty over permissions as possible, I did
> 
>
jonathan$ chmod 777 /usr/local/bin/pdfbox-app-1.8.10.jar
> drj-air:Desktop
jonathan$ ls -al /usr/local/bin/pdfb*
> -rwxrwxrwx@ 1 jonathan  staff  10613055
Aug 16 13:26 /usr/local/bin/pdfbox-app-1.8.10.jar
> 
> (I don't understand the
@ flag: Is that the problem?) Anyway, it still doesn't work:
> 
> jonathan$
java -jar pdfbox-app-1.8.10.jar \
>> ExtractText aFile.pdf > aFile.txt; cat
aFile.txt
> Error: Unable to access jarfile pdfbox-app-1.8.10.jar
> 
> 
>
What seems to work, again, is to supply the full path of
pdfbox-app-1.8.10.jar:
> 
> jonathan$ java -jar
/usr/local/bin/pdfbox-app-1.8.10.jar \
>> ExtractText aFile.pdf > aFile.txt;
cat aFile.txt
> (Text)
> 
> which is also what I got before modifying
pdfbox-app-1.8.10.jar's permissions. Any further suggestions?


what you can
do is put the .jar in either /Library/Java/Extensions or
~/Library/Java/Extensions

the you can run the pdfbox app like this

java
org.apache.pdfbox.PDFBox <command> <args>

BR
Maruan


> 
> Jonathan
>

> 
> 
> -----Original Message-----
> From: Andreas Lehmkühler
<andreas@lehmi.de>
> To: users <users@pdfbox.apache.org>; Jonathan Levi
<drjlevi6@aol.com>
> Sent: Tue, Nov 3, 2015 5:48 am
> Subject: Re: Shell Can't
Find pdfbox
> 
> 
> Hi,
> 
>> Jonathan Levi <drjlevi6@aol.com> hat am 3.
November 2015 um 03:25
> geschrieben:
>> 
>> 
>> I'm finding that shell
commands to use
> pdfbox-app-1.8.10.jar won't work unless
>> the full path is
used. Example:
>> 
> 
>> drj-air:Desktop jonathan$ ls
/usr/local/bin/pdfb*
>> 
> /usr/local/bin/pdfbox-app-1.8.10.jar
>>
drj-air:Desktop jonathan$ java -jar
> pdfbox-app-1.8.10.jar ExtractText
>>
Contact-Office-Letter.pdf 
>> Error: Unable
> to access jarfile
pdfbox-app-1.8.10.jar
>> drj-air:Desktop jonathan$ java -jar
>
/usr/local/bin/pdfbox-app-1.8.10.jar
>> ExtractText
Contact-Office-Letter.pdf
> 
>> drj-air:Desktop jonathan$ 
>> 
>> Is there a
shell variable that has to be
> set for Java to know where to look
>> for
jars?
> I guess the issue might be that
> your user doesn't have sufficient
rights to
> access the jar.
> 
> Check the output
> of 
> 
> ls -al
/usr/local/bin/pdfb*
> 
> and change the access permissions if
> necessary
>

>> Using Mac OS X 10.11.1.
>> 
>> TIA,
>> 
>> 
> Jonathan
> 
> BR
>
Andreas
> 
> 
>



---------------------------------------------------------------------
To
unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional
commands, e-mail: users-help@pdfbox.apache.org


 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message