Hasher

Command line , banging my head....

9 posts in this topic

Always seem to have issues with trying to do command lines . This is what i am trying to do.

 

;this is original code
  RunWait(@ScriptDir & "\PDF2Image\pdf2img.exe pdf2img -f 1 -l 4 -i " & $avUser[$i] & " -o " & @ScriptDir & "\Packing\" & $filename & "\*.jpg")
   
   
   ;tried simplifying as I was thinking its long file names
   RunWait(@ScriptDir & "\PDF2Image\pdf2img.exe pdf2img -i C:\input.pdf -o C:\*.jpg")
   
   ;The cmdline app launches but thats it, just shows the help menu
   ;Anytips what i'm doing wrong ?

-------------------------------------------------------

-i [input PDF file]  : Specify input PDF filename
-o [output TIF file] : Specify output TIFF filename
-g                   : Convert to 8-bit grayscale image file, this option
                       is only available while bitcount equal 8 (-b 8)
-m                   : Set output to multi-page TIFF file, the
                       default is output to single page TIFF files
-r [resolution]      : Set resolution in generated image files
    -r 300           : Set horizontal and vertical resolution to 300 DPI
    -r 200x300       : Set horizontal and vertical resolution to 200x300 DPI
    -r 204x98        : Set horizontal and vertical resolution to 204x98 DPI
-f [first Page]      : First page to convert
-l [last Page]       : Last page to convert
-c [compress]        : Set compression method in generated image
                       files(for tif only)
    -c none          : Create TIFF file without compression
    -c lzw           : Compress TIFF using LZW arithmetic
    -c jpeg          : Compress TIFF using JPEG arithmetic
    -c packbits      : Compress TIFF using packbits arithmetic
    -c g3            : Compress TIFF using CCITT G3 arithmetic
    -c g4            : Compress TIFF using CCITT G4 arithmetic
    -c ClassF        : Compress TIFF into Fax compatible ClassF 204x98 format
    -c ClassF196     : Compress TIFF into Fax compatible ClassF 204x196 format
-q [quality]         : Set quality in generated image files(for jpeg image only)

-b [bit count]       : Set bit count in generated image files
-?                   : Help
-------------------------------------------------------
Example:
    pdf2img -i C:\input.pdf -o C:\output.tif
    pdf2img -m -i C:\input.pdf -o C:\output.tif
    pdf2img -c lzw -i C:\input.pdf -o C:\output.tif
    pdf2img -q 80 -i C:\input.pdf -o C:\output.jpg
    pdf2img -b 4 -i C:\input.pdf -o C:\output.tif
    pdf2img -i C:\input.pdf -o C:\output.tif -b 1 -c ClassF -r 204x98 -m
    pdf2img -f 1 -l 9 C:\input.pdf -o C:\output.jpg
    pdf2img -i C:\*.pdf -o C:\*.pcx
Press any key to continue...
 


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Great :)
And your question is? Just saw that your question is part of the code box.

RunWait(@ScriptDir & "\PDF2Image\pdf2img.exe -i C:\input.pdf -o C:\*.jpg")

I removed "pdf2img".

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

It was in the code . Cant see why the app isn't processing the file. Am I calling it wrong ?

 

Quote
   ;The cmdline app launches but thats it, just shows the help menu
   ;Anytips what i'm doing wrong ?

 


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

You are using a wildcard in the output parameters, but a static file for the input - could that be your issue?

RunWait(@ScriptDir & "\PDF2Image\pdf2img.exe pdf2img -i C:\input.pdf -o C:\input.jpg")

 

Share this post


Link to post
Share on other sites
7 minutes ago, Hasher said:

Am I calling it wrong ?

Yes, I think you do. Did you see my code example above?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
1 minute ago, MuffinMan said:

You are using a wildcard in the output parameters, but a static file for the input - could that be your issue?

RunWait(@ScriptDir & "\PDF2Image\pdf2img.exe pdf2img -i C:\input.pdf -o C:\input.jpg")

 

yeah I tried that ! Trying all sorts of outp

uts


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites
1 minute ago, water said:

Yes, I think you do. Did you see my code example above?

Will try  Water!

 


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

Thanks Water . That was the main  issue!!


Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

:)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now