coherentgraphics / cpdf-binaries

PDF Command Line Tools binaries for Linux, Mac, Windows
Other
581 stars 42 forks source link

Not Recognizing Pdf #63

Closed sebasrocksocks closed 2 years ago

sebasrocksocks commented 2 years ago

Hello,

I am trying to edit a pdf using this line of code

/Users/MYNAME/Documents/Coding/cpdf -mediabox "4mm 15mm 155.1mm 234.88mm" test.pdf -o 2.pdf

and this is my results

"For non-commercial use only To purchase a license visit http://www.coherentpdf.com/

File test.pdf does not exist"

Am I doing something wrong? The cpdf file is in the same folder as the pdf and the actual pdf's name is test.

johnwhitington commented 2 years ago

Cpdf will search for the file "test.pdf" in the current folder, not the folder where the cpdf executable is. So you should move to that folder with "cd".

Or, you could install "cpdf" in somewhere standard (maybe /usr/local/bin?) then you won't need to give its full path every time.

sebasrocksocks commented 2 years ago

Moving it cpdf to usr/local/bin and executing

"cpdf -mediabox "4mm 15mm 155.1mm 234.88mm" test.pdf -o 2.pdf"

worked! Thank you.