Hi,

Am 14.05.2011 10:41, schrieb Markus Schlautmann:
Hi,

thanks for your tip, bit it is not working for me:

C:\pdfbox>java -jar pdfbox-app-1.5.0.jar org.apache.pdfbox.Print
PDF -silentPrint 200900186.pdf
usage: java pdfbox-app-x.y.z.jar <command> <args..>

whats wrong with the usage? i got it from the website, quite confusing...
Sorry, I didn't check the remaining part of your command line.

It has to be:

java -jar pdfbox-app-1.5.0.jar PrintPDF <command> <args..>

The command line mentioned on our website is obviously wrong. I'll fix that 
later.

Best Regards
Markus


BR
Andreas Lehmkühler


Am 14.05.2011 10:28, schrieb Andreas Lehmkuehler:
Hi,

Am 13.05.2011 23:19, schrieb Markus Schlautmann:
Hi,

i am new to pdfBox and i want to use it to print pdf via command line.
i am
using Windows as my OS.
i downloaded pdfbox-app-1.5.0.jar and tried the following statement:

C:\pdfbox>java pdfbox-app-1.5.0.jar org.apache.pdfbox.PrintPDF
-silentPrint
200900186.pdf

the pdf is in the same directory as pdfbox-app-1.5.0.jar.

i found this statement here:
http://pdfbox.apache.org/commandlineutilities/PrintPDF.html

Unfortunately it is not working:

C:\pdfbox>java pdfbox-app-1.5.0.jar org.apache.pdfbox.PrintPDF -
silentPrint 200900186.pdf
Exception in thread "main" java.lang.NoClassDefFoundError:
pdfbox-app-1/5/0/jar
Caused by: java.lang.ClassNotFoundException: pdfbox-app-1.5.0.jar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: pdfbox-app-1.5.0.jar. Program will exit.

Could you please give me a hint what goes wrong?
You should copy the whole statement. You forgot the "-jar" option ;-)

java -jar pdfbox-app-1.5.0.jar org.apache.pdfbox.PrintPDF -silentPrint


Thanks a lot

Best Regards
Markus

BR
Andreas Lehmkühler


Reply via email to