Its been a while since I had to work with printing scripts, I use a plugin now to handle things (stupid I know)
Anyway, I seem to recall that if you perform an actual print, then set up your script (or is it the other way around)
Then repeat the process for the next scripted print step, it should save ok.
You didnt mention what FM version, they changed things a few times between 8, 9 and 10
P.S I also had trouble if I went back in to the script to check the settings, so try and make use of the 'print script' feature, it will print out all the settings contained within that script step.
Thanks, but still no go. I'm surprised that I can't find more complaints about this problem. It's ridiculous having to purchase a plugin for something that FileMaker should automatically handle.
In the "Print Setup" script step all you do is basically set up the orientation (landscape/portrait) and "format for" whatever printer. I always select "any printer". The "Print" script step is where you choose the printer that will actually print the document. FM will "remember" this . . . meaning the script will always do what it's meant to do. FM has a number of issues regarding printing . . . particularly choosing printers. I have, and have expressed, opinions on this issue, as well as offering a solution. http://forum-en.filemaker.com/fm/board/message?board.id=FM-en-4&message.id=41087#M41087
On windows the print script step does not le you choose "any printer" however it still does not store a printer name.
It does however seem to conflict by storing the Orientation and paper size
ie. A print out of a script shows this. The script has two print setup's and print steps
[ Restore; No dialog ]Print [ Records being browsed; All Pages; Orientation: Portrait; Paper size: 8.26" x 11.69" ]
[ Restore: PrinterSwitch PDF Printer ]
[ Restore; No dialog ]Print [ Records being browsed; All Pages; Orientation: Portrait;Paper size: 8.26" x 11.69" ]
[ Restore: Microsoft XPS Document Writer ]
Some other issues include, giving your end user the ability to swap and change printers as and when they want, without editting scripts.
i.e, they go and buy a new printer, they want to print reports on the laser in draft mode, but they want to print images on their new photo printer in full colour.
This kind of flexibility is not possible on a locked down solution. Hence the plugin provides the magic to make it possible.
I have made feature requests for years for them to add a new script step to set a printer by name and a function for getting installed printers.
I wouldnt hold your breath for such a thing...
Thanks for the input. I think I have solved the problem. I set up a bunch of different scripts, one for each printer and special paper size. I call the proper script from within my main script and the proper printer and page formatting is as expected.
FileMaker did a lousy job on this one, but it's a bonus for the people who write the high priced plug-ins.
"On windows the print script step does not le you choose "any printer" however it still does not store a printer name."
On Mac that's true of the "Print" step. However the "Print Setup" step allows "Format for . . ." where you choose which printer to format "for". Now, are you saying, SW, that in the Print step, you can't select a printer? I don't think that's correct. I believe you can specify which printer, and that every time the script runs it will use that printer. It isn't dynamic though, and FMI could certainly improve on this. Like you said: new printer . . . re-write scripts. There is a work around and I referred to it in the earlier post. I have my whole system printing via shell scripting and it works. I wouldn't begin to assume I could do it on Windows 'tho.
Hi Rick, after re-reading.. I think I mis-understood it slightly when you said "any printer" lol
I can of course choose any installed printer.
I thought you mean there was an actual option for 'any printer' rather than being forced to set a specific one.
Kudos for your workaround by the way... Thats going to help a lot of people out ;-)
I did mean literally "any printer" as a choice, but this is NOT in the Print script step. It's in The Print Setup step, where the choice of orientation is made along with "Format for" (printer). As far as the workaround, I wish I knew enough to make it work on both Windows and OSX because it's working well on a Mac.
Thank you. I don't have a Windows machine (probably should) and wasn't aware of the differences.