views:

147

answers:

0

I am automating the printing of jpg files using a windows batch file and the command line interface for the Windows Picture and Fax Viewer. The command I'm using in my .bat is:

rundll32.exe C:\Windows\System32\shimgvw.dll,ImageView_PrintTo /pt "%fullpath_to_jpg%" "%printer_name%"

My photo printer does 4x6 prints. If the jpg file is exactly 4x6 aspect ratio, everything works fine and I get a full-bleed 4x6 print. If not, I get a white border that I do NOT want. In Windows Explorer, I can right click on the non-4x6 jpg and select print to invoke the Photo Printing Wizard, select "Full page photo print" and it crops to give me the full-bleed 4x6 print that I want.

How can I specify "Full Page Photo Print" layout selection from the command line to tell shimgvw.dll to "crop and rotate to fit" not "center and rotate to fit"? Is there a registry setting to select this as the default layout instead of the "Full page fax print? Should I be using photowiz.dll instead of shimgvw.dll?

I can't find a reference for command line parms or registry settings for these dlls.