Mailing Lists: Apple Mailing Lists

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

printing from webkit for java solved




Hi I committed small change to sourceforge repository
so webkit for java now support printing from  js call window.print

basically it uses undocumented API:
(dts engineer helped me out with that
thank you very much)

this method should be added into the CC_DMWebKitView.m file

- (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView
{
    NSLog(@"somebody wants to print");
    NSPrintOperation *operation = [frameView printOperationWithPrintInfo:[NSPrintInfo sharedPrintInfo]];
    if (operation == nil) {
        // This can happen for PDF documents with printing disabled, e.g.
        NSBeep();
        return;
    }
    [operation runOperation];
}

if somebody wants to add some more sophisticated 
support she/he is more than welcome
thanks



Dmitry Markman


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/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.