| View previous topic :: View next topic |
| Author |
Message |
biotech as guest Guest
|
Posted: Tue Jan 15, 2008 2:51 pm Post subject: PDF command line tool |
|
|
does anybody know of command tool that can retrieve the page number from the pdf document. small and free. it has to be something like that
the case is that i wasnt able to find it. |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 504
|
Posted: Tue Jan 15, 2008 3:34 pm Post subject: |
|
|
| where do u type that? I tried CMD but had no luck, it's not recorgnizing pdftk as a valid command. |
|
| Back to top |
|
 |
biotech as guest Guest
|
Posted: Tue Jan 15, 2008 3:52 pm Post subject: |
|
|
| thanks! |
|
| Back to top |
|
 |
biotech as guest Guest
|
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 504
|
Posted: Tue Jan 15, 2008 4:52 pm Post subject: |
|
|
omg, this is sooooooo coooooooool .
Thanks! |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 504
|
Posted: Tue Jan 15, 2008 8:08 pm Post subject: |
|
|
| shot in the dark, but does anyone know of a utility that will allow me to crop pdf pages with cmd? |
|
| Back to top |
|
 |
williamsharkey
Joined: 06 Oct 2007 Posts: 49 Location: Philadelphia
|
Posted: Tue Jan 15, 2008 8:12 pm Post subject: |
|
|
| Quote: | | shot in the dark, but does anyone know of a utility that will allow me to crop pdf pages with cmd? |
No. But, (another shot in the dark), maybe you could change printer margin settings, and in that way, "crop" the pdfs @ print-time. |
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Tue Jan 15, 2008 8:53 pm Post subject: |
|
|
| neXt wrote: | | shot in the dark, but does anyone know of a utility that will allow me to crop pdf pages with cmd? | That should help: PDF Split and Merge (java - open source) |
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 504
|
Posted: Tue Jan 15, 2008 9:10 pm Post subject: |
|
|
Question, i can't get it to work with AHK, here is what i have tried:
| Code: | | run %comspec% pdftk ENT.pdf dump_data output pages.txt |
| Code: | | run %comspec% /c pdftk ENT.pdf dump_data output pages.txt |
| Code: | | runwait %comspec% /c pdftk ENT.pdf dump_data output pages.txt |
If i test it through cmd it works just fine, how do i make it work?
I even tried running it from the same directory:
| Code: | | run pdftk.exe ENT.pdf dump_data output pages.txt |
Any ideas?
Thanks.  |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
Posted: Tue Jan 15, 2008 9:38 pm Post subject: |
|
|
Having a.pdf and pdftk.exe in the same directory, this worked for me:
| Code: | | run pdftk a.pdf dump_data output a.txt | The file a.txt was created _________________ RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2 |
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 504
|
Posted: Tue Jan 15, 2008 10:31 pm Post subject: |
|
|
| My bad, running %comspec% from AHK automatically sets working directory to scripts folder, i though i was working in "documents and settings". Everything is good now, thatnks. |
|
| Back to top |
|
 |
biotech as guest Guest
|
Posted: Fri Jan 18, 2008 5:48 pm Post subject: |
|
|
please can anybody post a working example of how we can execute this command line program from the script?
i tried and succeeded to start from command line but when i try from script
i dont have any results.
the script and pdftk.exe are in the same folder and pdf file as well
how do i get this to work pdftk final.pdf dump_data output final.txt
thanks in advance. |
|
| Back to top |
|
 |
neXt
Joined: 18 Mar 2007 Posts: 504
|
Posted: Fri Jan 18, 2008 6:10 pm Post subject: |
|
|
| Code: | | runwait %comspec% /c pdftk ENT.pdf dump_data output pages.txt |
comspec in AHK is cmd. Switch /c will run command and exit after it's done, if you have problems replace it with /k it will show you what error you have.
this will run cmd in hidden mode:
| Code: | | runwait %comspec% /c pdftk ENT.pdf dump_data output pages.txt,,hide |
|
|
| Back to top |
|
 |
|