joegold Posted October 10, 2002 Posted October 10, 2002 I have a runtime solution with some complicated print scripts. I print without a dialog box because I do not want my users choosing the wrong options. But now some of my Windows users have told me that they have two printers connected to their computer and they cannot switch between them. For some reason, changing the default printer does not change the printer that the runtime deafults to. I am using two USB printers - one an HP Laserjet 1100, and the other an HP Deskjet 640C. No matter what I do, it seems to want to stay with the Deskjet. I even added a script called "Change Printer" which basically prints a test page and opens the print dialog box. When the dialog box opens, I choose the laser printer. The test page prints fine on the laser printer. But then when I choose a normal print script without a dialog box, it goes right back to the deskjet. Anyone have any ideas how to solve this?
kenneth2k1 Posted October 10, 2002 Posted October 10, 2002 What OS are you running? If the regular print scripts have restore print setup, then it will look for the original installed printer when the script was made. You may want to take this option out of the scripts for the user.
CobaltSky Posted October 10, 2002 Posted October 10, 2002 Full-blown printer management code for a runtime (to cater for a broad cross-section of printers/print setups) can be quite an undertaking in itself. Lucky you've only got two to worry about. If you've got to make a revision to the runtime to address this problem, you would perhaps be best to put in the most basic form of a multi-printer architecture. What I'd suggest you consider doing is to create a global 'preference' field in your runtime in which the users choose Printer A or Printer B. Then create four print scripts: Landscape Deskjet - a landscape Page Setup and Print (no dialog) for the HP Deskjet 640C Portrait Deskjet - a portrait Page Setup and Print (no dialog) for the HP Deskjet 640C Landscape Laserjet - a landscape Page Setup and Print (no dialog) for the HP Laserjet 1100 Portrait Laserjet - a portrait Page Setup and Print (no dialog) for the HP Laserjet 1100 Then include a conditional sequence in your printing scripts that runs along the lines of: If ["gPrinterOptionField = Printer A"] Perform Script ["Landscape Deskjet"] Else Perform Script ["Landscape Laserjet"] EndIf This basic approach can be extended to cater for any number of set-ups, but it sounds like your problem is limited to two printers at this stage.
kenneth2k1 Posted October 10, 2002 Posted October 10, 2002 Yes, this does of course assume that there will only be two types of printers that your users will have. I also noted that you are making runtimes, so I presume that your market may bear more than these two types of printers. On the couple of runtimes that I have made for users, I like to just give them the control over how they print. Unfortunately you lose some of the ease and automation that came with the runtime, but users break printers, replace them with others or reinstall them and forget to set the default.
joegold Posted October 10, 2002 Author Posted October 10, 2002 Yes, my users will use all types of printers. The examples I gave are the two printers I happen to own. I have solved the problem by first doing a stored page setup with no dialog box, and then immediately following it with an unstored page setup with a dialog. I then pop up a message that says please choose your printer and hit OK, but please do not change any other settings. By starting off with the stored page setup, I at least make sure that the orientation and the quantity (current record or browsed records) is correct. Of course, the users could change all that, but hopefully my warning message will prevent them from doing that. Then when the actual print command is performed I do it without a dialog box. This was important to me because my particular script is written so that when you print twenty letters, you are actually printing the current record twenty times (each time moving to the next record), and not printing the records being browsed. Making the user hit print twenty times was not acceptable.
Recommended Posts
This topic is 8079 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now