• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Printing Backgrounds With A WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing Backgrounds With A WebView


  • Subject: Printing Backgrounds With A WebView
  • From: Michael Stearne <email@hidden>
  • Date: Thu, 2 Dec 2004 20:44:40 -0500

I am printing a Web View with: NSPrintOperation printOperationWithView: printInfo:

Where or how do I specify that I would like the background images and colors to be included in the print. I am doing this without user interaction so I need to specify it here...

A snipet is below (this is actually python code using the PyObjC bridge)

            sharedInfo = NSPrintInfo.sharedPrintInfo()
            sharedDict = sharedInfo.dictionary()

            printInfoDict = {}
            printInfoDict[NSPrintJobDisposition] = NSPrintSaveJob
            printInfoDict[NSPrintSavePath] = filenamePDF

printInfo = NSPrintInfo.alloc().initWithDictionary_(printInfoDict)
printInfo.setHorizontalPagination_(NSAutoPagination)
printInfo.setVerticalPagination_(NSAutoPagination)
printInfo.setVerticallyCentered_(NO)


printOp = NSPrintOperation.printOperationWithView_printInfo_(view, printInfo)
printOp.setShowPanels_(NO)
printOp.runOperation()



Thanks,

Michael

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Printing Backgrounds With A WebView
      • From: Steven Kramer <email@hidden>
  • Prev by Date: [Moderator] Re: Request: Set reply-to to ML
  • Next by Date: Re: Netiquette with private letters (was: Request: Set reply-to to ML)
  • Previous by thread: Re: I need help compiling an application
  • Next by thread: Re: Printing Backgrounds With A WebView
  • Index(es):
    • Date
    • Thread