Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

Script file needed to automatically print an image file

I didn't see a Topic area for scripting, so hope someone here can respond.

I have image files that need to be printed automatically so the user does not have to bothered with being familiar with a particular application in order to print a file.  I have successfully created a script file that addresses AutoCad files. This is accomplished with AutoCad's ability to use a script file. Now I need the same ability for some kind of viewer for jpg and tif files.

Does anyone know of a shareware image viewer that accepts commands from a script file that I could use to automate the printing of these other file types? Or some other method to do this automatically?
0
llap
Asked:
llap
  • 5
  • 3
1 Solution
 
fulscherCommented:
I use QuickViewPlus which can display and print most image types (currently made by Stellent, http://www.stellent.com) and distributed by AvantStar (http://www.avantstar.com/intradoc-cgi/idc_cgi_isapi.dll?IdcService=SS_GET_PAGE&ssDocName=QuickViewPlusOverview). The list of supported format is here: http://www.avantstar.com/stellent/groups/public/documents/word_files/quickviewplus8formats.pdf

An eval version is available. There is a command line switch to print files without displaying them.

Don't expect too much, though.

Hope this helps
Jan
0
 
llapAuthor Commented:
Thanks Jan. I tried the QuickViewPlus as you referenced. It ALMOST does what I want. It will accept command line instructions - so I can start it and open a specific image file from a script file. The catch is QuickViewPlus does not have a command line parameter to format the printer - so what I get is the default 8 X 10, portrait instead of the 11 X 17 landscape that I want. When you run QuickViewPlus manually, it does remember your previous printer settings, but so far(I've talked to product support) they don't have a way to make this "completely" automatic in the format that I want.

I'll wait awhile to see if someone posts any other suggestions. I have looked at AutoPrint as another option -- haven't tried it yet. It's supposed to be able to print any file that you dump in a specific folder -- that could work OK as long as I can configure the printer. It's more expensive than QuickViewPlus.
John
0
 
fulscherCommented:
Hm - I know it's kind of cheap - but the settings are stored in the registry in the key

HKEY_CURRENT_USER\Software\Inso\Quick View Plus\CurrentVersion

So, you could set the correct settings once, save them in a file and dump them to the registry before running QVP...

Jan
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
llapAuthor Commented:
I've done almost zip as far as registry manipulation. Do you mean exporting the registry settings to a file, then importing that file back into the registry prior to firing up QVP??

Or... there is a printer settings "save" option (to a file)-- but I don't see how to automatically restore this file from a QVP command line.

I appreciate any further explanation you can offer.
Thanks in advance.
John
0
 
llapAuthor Commented:
OK, I think I'm handling the registry -- check me on this (still not solved though)

I set the printer settings in QVP (printed a 11 x 17 in landscape), went to registry and exported a file called qvp.reg. Then my script file is as follows:

  regedit /s qvp.reg
  "C:\Program Files\Quick View Plus\PROGRAM\qvp32.exe" -f? c:\tiftest.tif -sprn

BUT.....it didn't make a difference with the printing -- still got an 8x10, portrait

here's the contents of qvp.reg:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Inso\Quick View Plus\CurrentVersion]
"FNTreeHeight"=dword:000001df
"FNOpenedTo"=hex:14,00,1f,50,e0,4f,d0,20,ea,3a,69,10,a2,d8,08,00,2b,30,30,9d,\
  19,00,23,43,3a,5c,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,31,84,\
  00,00
"FNOpenedSize"=dword:0000002f
"QVPDimensions"=dword:0307041f
"FileNavigatorOffsets"=dword:00fe0064
"ShowSingleByDef"=dword:00000001
"Orientation"=dword:00000000
"PageView"=dword:00000000
"File Navigator Orientation"=dword:00000001
"AttachExplorerFlags"=dword:00000004
"Text Encoding"=dword:00000fa5
"HTML Encoding"=dword:0000044d
"Toolbar"=dword:00000001
"Statusbar"=dword:00000001
"ReuseWindow"=dword:00000000
"ShowFN"=dword:00000001
"AutoOptions"=dword:00000001
"StartupLogo"=dword:00000001
"UnsupportedTypes"=dword:00000002

I didn't see in the registry any reference that indicated it was saving the printer info there. Not sure where else to look --
We may be getting close
john

0
 
fulscherCommented:
Sorry for the delay. Dinner time, here.

I got the wrong registry key. Looks like printer settings are saved in the key HKEY_CURRENT_USER\Software\SCC\Viewer Technology\OEM99\Options and its subkeys. There are more settings in HKEY_CURRENT_USER\Software\SCC\Viewer Technology\OEM05 but I don't know what they do.

You got the registry bit precisely right.

Jan


0
 
llapAuthor Commented:
Jan,
Still no luck, even after getting the different registry info to replace the reg file.  I have contacted support at QVP to let them know what we're trying - asking for any suggestions.
I'll check back later after I've heard more (maybe not until tomorrow).
thanks
john
0
 
llapAuthor Commented:
OK - got it working. Registry tweaking appears to be the only way to automate using QVP - since they offer no additional printer options for landscape and paper size. Consequently, the registry settings that need to be modified are in the HKEY_CURRENT_USER\Printers\DevModePerUser.

I've simply created a reg file for 11x17 and one for 8.5x11 (in order to reset back to default after I'm done with my qvp print routine). This is not really what I anticipated I'd have to do, but it seems to work OK.

Jan, mostly what you did for me was forced me into a 1st lesson crash course in registry. Previously, I had looked around in there, but not really done any exporting/importing.  I've been warned that it's like playing with fire - so be careful. In fact, after initial registry mods had almost got this working - my script file that called qvp, got hung up (multiple attempts, restarts, etc.) so I ended up uninstalling/reinstalling qvp -- now my script along with the registry manipulation works.

script file: qvp_print.cmd:

  regedit.exe /s reg_11x17_landscape.reg
  "C:\Program Files\Quick View Plus\PROGRAM\qvp32.exe" -f? c:\tiftest.tif -sprn
  rem include a pause, otherwise printer gets reset to default too quickly
  pause
  regedit.exe /s reg_8halfx11_portrait.reg

I may actually run this routine on a seldom used computer that can just maintain a default 11x17 printer setting and avoid the registry manipulation, but I'm glad to understand how this is controlled.
Thanks again for your help. I'm accepting your answer and awarding the points.
john




0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now