WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Print Formatted Image Files

 Keywords:  printing format image tif jpg gif files

Question:

I want to take 4 or six, single page tif files and print them on a single sheet of paper. They are identical sized images, so they would have to be scaled down in the same proportion. They can be layed out two across and 2 or 3 down.

I'm looking for a way to do this from within wbt. The program i'm writing already manipulates & stores these tif files. I just want to print them 4/6 per page under program control from within wbt. Any ideas?

Answer:

Well. Hmmm. WinBatch does not really print stuff like that. The most you could hope for is to automate some other application to do it for you.

Windows XP seems to come with a suitable program. With older versions of Windows you may need a special program to do this. Actually Word for Windows can do this, but getting the images aligned might be tricky. There are a lot of photo-print programs out there that are pretty good at this and 4 pictures per page is pretty much of a default setting.

OR

Maybe it would be possible to simply prepare a HTML template document containing reserved spaces for the pics for one print page, (they could be resized within HTML), then store all pics in a specified folder, and use WinBatch to generate HTML pages with different name references as you work. (See the BinaryTag functions in the WIL help file.)

Then actual printing could then be done page by page from your web browser via WB automation. Or You might even be able to handle it via OLE, like this:

cURL = "c:\temp\template.htm"
oE     = ObjectAccess("InternetExplorer.Application",@TRUE)
oE.Visible = @True
oE.Navigate(cURL)

While oE.readystate<>4
   TimeDelay(1)
EndWhile

oDoc = oE.Document

OLECMDEXECOPT_DODEFAULT = 0;
;Note: if running IE 5.5 
;OLECMDEXECOPT_DONTPROMPTUSER will be 
;ignored, because of a security patch added
;In that version, hence why we attempt to 
;send keys to any print dialog if 
;one appears
OLECMDEXECOPT_DONTPROMPTUSER = 2;
oDoc.ExecCommand("PRINT",OLECMDEXECOPT_DONTPROMPTUSER)
if WinWaitExist("Print",5)
   SendkeysTo("Print","{ENTER}")
endif
ObjectClose(oDoc)
ObjectClose(oE)
exit
For more info on ExecWB see: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/execwb.asp
Article ID:   W15167
File Created: 2002:09:05:13:50:12
Last Updated: 2002:09:05:13:50:12