Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!apple.com!casseres From: casseres@apple.com (David Casseres) Newsgroups: comp.sys.mac.programmer Subject: Re: Changing Page Setup Defaults: How do I do it? Message-ID: <3332@internal.Apple.COM> Date: 3 Aug 89 21:49:27 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 44 References:<4157@lindy.Stanford.EDU> <5156@umd5.umd.edu> In article <5156@umd5.umd.edu> zben@umd5.umd.edu (Ben Cranston) writes: > In article <4157@lindy.Stanford.EDU> philf@metaphor.com (Phil Fernandez) writes: > > ...I want the Page Setup defaults to select "landscape" orientation > > rather than portrait, and to select "Larger Print Area" > At the risk of making an utter fool of myself (since I have never > actually tried to do this), here is a possible approach. Actually the suggested approach, as follows, is very reasonable. > Cache a print record globally for your application (rather than or in > addition to the print record cached with each document). You could > ship your app with an appropriate print record for the current level > of Apple printing, or whatever system you ship with the application. By "level" I assume you mean version. > As long as printing levels do not change you should be able to propagate > landscape and/or larger print area in this fashion. You should detect > the case that printing level changes and the print drivers are giving > you a default printing record. In this case, put up a dialog to the > user: > Printing level has changed. > Be sure to do a Page Setup and set the Landscape and > Larger Print Area options. > then when he does so, cache the print record. Actually it is very unlikely that a version change will invalidate an existing print record for a given printer type; after all, this would force all existing documents to be reformatted and presumably Apple will try hard to avoid ever doing this. The problem will be when your code encounters a different printer type. You should cache a record for each type of printer you know about, and if the first one you try is invalid, try another, and so forth until one succeeds. If none of your cached records is valid, do as Mr. Cranston says above. Note that when the new printing architecture comes out, there will soon be lots of printer types in the game, not just the current 4 types. David Casseres Exclaimer: Hey!