Jump to content

Printing Pictures?


Recommended Posts

Personally I would use Irfanview or some other graphics package that supports command line options.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

I can't use any 3rd party program (that needs to be installed like IView), cause i can't install it on every pc i'd like to use this script on.

Perhaps any dll? Somebody must know; i've already read about dlls to play with printer settings in these forums... :think:

Edited by forever
Link to comment
Share on other sites

I can't use any 3rd party program (that needs to be installed like IView), cause i can't install it on every pc i'd like to use this script on.

Perhaps any dll? Somebody must know; i've already read about dlls to play with printer settings in these forums... :think:

You don't need to "install" IrfanView, you just need to run the executable. (You can put i_view.32.exe in the same directory as your AutoIt script, or you can "FileInstall()" it to @TempDir).

If you already have a mechanism for running an AutoIt-developed script on various machines, it is no extra work to run an arbitrary exe.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

So could any1 tell me the parameter for ifranview ?..

Here you go

Command line options allow you to set some functions of IrfanView before the viewer is launched.

These command line options are supported in IrfanView:

/one - force 'Only one instance'

/fs - force Full Screen display

/bf - force 'Fit images to desktop' display option

/title=text - set window title to 'text'

/pos=(x,y) - move the window to x,y

/convert=filename - convert input file to 'filename' and close IrfanView

(see Pattern page for additional options)

/slideshow=txtfile - play slideshow with the files from 'txtfile'

/slideshow=folder - play slideshow with the files from 'folder'

/thumbs - force thumbnails

/killmesoftly - close all IrfanView instances

/closeslideshow - close slideshow and close IrfanView after the last image

/page=X - open page number X from a multipage input image

/crop=(x,y,w,h) - crop input image: x-start, y-start, width, height

/print - print input image to default printer and close IrfanView

/print="Name" - print input image to specific printer and close IrfanView

/resize=(w,h) - resize input image to w (width) and h (height)

/resample=(w,h) - resample input image to w (width) and h (height)

/capture=X - capture the screen or window (see examples below)

/ini - use the Windows folder for INI/LST files (read/save)

/ini="Folder" - use the folder "Folder" for INI/LST files (read/save)

/clippaste - paste image from the clipboard

/clipcopy - copy image to the clipboard

/silent - don't show error messages for command line read/save errors

/invert - invert the input image

/dpi=(x,y) - change DPI values

/scan - acquire the image from the TWAIN device - show TWAIN dialog

/scanhidden - acquire the image from the TWAIN device - hide TWAIN dialog

/batchscan=(options) - simulate menu: File->Batch Scanning, see below for example

/bpp=BitsPerPixel - change color depth of the input image to BitsPerPixel

/swap_bw - swap black and white color

/gray - convert input image to grayscale

/rotate_r - rotate input image to right

/rotate_l - rotate input image to left

/filepattern="x" - browse only specific files

/sharpen=X - open image and apply the sharpen filter value X

/contrast=X - open image and apply the contrast value X

/hide=X - hide toolbar, status bar, menu and/or caption of the main window (see examples below)

/aspectratio - used for /resize and /resample, keep image proportions

/info=txtfile - write image infos to "txtfile"

/append=tiffile - append image as (TIF) page to "tiffile"

/multitif=(tif,files) - create multipage TIF from input files

/jpgq=X - set JPG save quality

/tifc=X - set TIF save compression

/wall=X - set image as wallpaper

/extract=(file,ext) - extract all pages from a multipage file

/import_pal=palfile - import and apply a special palette to the image (PAL format)

/monitor=X - start EXE-Slideshow on monitor X

Notes:

- Only lower case options are supported (don't type any UPPERCASE letters) !

- Input file name (if required) is always the first parameter!

- Use "" for file names with spaces, example: "dummy test file.jpg".

- Write always the FULL paths for file names (incl. drive).

- You can combine several options in one command.

- Wildcards (*) supported only for /convert, /print and /info.

- Maximal command line length is limited by Windows.

Edit - example for print

Example for /print:

i_view32.exe c:\test.jpg /print

Open 'c:\test.jpg', print the image to default printer and close IrfanView.

i_view32.exe c:\test.jpg /print="Printer Name"

Open 'c:\test.jpg', print the image to specific printer and close IrfanView.

i_view32.exe c:\*.jpg /print

Print all JPGs from "C:\" and close IrfanView.

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

It turns out that you might also need the i_view32.ini file. You can run IrfanView manually, manipulate the Print settings, then check how the ini file changed. Use AutoIt's INI functions to manipulate that file. An excerpt of the ini file is below.

[Print]
Option=0
Width=5.00
Height=5.00
Left=0.00
Top=0.00
Inches=0
AspectRatio=1
ScaleX=1.00
ScaleY=1.00
Centered=1
Copies=1
Head=0
HeadTxt=
Foot=0
FootTxt=
FontParam=-21|0|0|0|400|0|0|0|2|3|2|1|2|
Font=Arial
Printer=pdfFactory
Orient=1
Size=1
Src=256
Color=2
Duplex=0
SizeTxt=Letter
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...