Mailing Lists: Apple Mailing Lists

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

Print out image to current paper



I want to make ASS application to print out image file. There is need to fit
the size of image to current paper.

But I could not find out the best way to do so...

Printing out the image is easy.
Fitting image to current paper is difficult.

(1) I tried to resize image to the size of the paper.

        set printInfo to call method "sharedPrintInfo" of class
"NSPrintInfo"
        
        --get paper size by point
        set {w_width, w_height} to call method "paperSize" of printInfo
        set w_height to w_height + 30
        set w_width to w_width + 10
        call method "resizeWindow:toHeight:toWidth:" of class
"CocoaUtilities" with parameters {window "w1", w_height, w_width}

"paperSize" seems not to return the size of paper by pixels.

This obj-c sample comverts them.

http://www.cocoabuilder.com/archive/message/cocoa/2005/1/12/125671


(2) I found "NSFitPagination". It seems to fit the size of image
automatically.  

Some samples use it. But they are whole written in obj-c....

http://www.cocoabuilder.com/archive/message/2004/6/24/110448


Is there any suggestion?


--My print out project
http://www.appleco.jp/maro_samples/image_print_test_v2.zip


--
Takaaki Naganoya
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



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.