Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing



I have succeeded in printing a table in AS with the following call methods:

set theTable to table view "theTable" of scroll view "theScroll" of window
"theWindow"
set printInfo to call method "sharedPrintInfo" of class "NSPrintInfo"
call method "setLeftMargin:" of printInfo with parameter 50 -- whatever you
want as margin distance
call method "setTopMargin:" of printInfo with parameter 50
call method "setRightMargin:" of printInfo with parameter 50
call method "setBottomMargin:" of printInfo with parameter 50
call method "setOrientation:" of printInfo with parameter 1 -- 1 sets it as
"landscape" orientation
call method "print:" of object theTable

The kicker is that it does not print the headers!!!!
Always something not quite right, it seems with AS workarounds.

-John

on 6/25/04 11:27 AM, matt neuburg at email@hidden wrote:

> On Wed, 23 Jun 2004 13:34:04 -0500, "John C. Welch" <email@hidden>
> said:
>> Is there any sample code for setting up, say data in a table for printing?
>
> Since you can't print from AppleScript (because graphics methods are not
> bridged), this really isn't an AppleScript Studio question. You'll need to
> learn how to print using Objective-C. m.
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.