• 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
Re: Printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing


  • Subject: Re: Printing
  • From: Uko Fiedler <email@hidden>
  • Date: Tue, 29 Apr 2003 10:30:06 +0200

On 2003-04-29 06:14:59 +0200 Carla Lewis <email@hidden> wrote:

My goal: print a custom report that I've dynamically built in memory from fields in a MySQL database.

I think you have two basic possibilities:
1. fill up and format a string with your logo and attributes, so the string will be an NSTextStorage object.
2. you can fill a standard NSView with fields, tables and images, which will not be visible to the user.

I just want to write dynamic rich text to the printer.

Any pointers?

The TextEdit source will be your tutorial

Fine tuning the print process can be watched in TextEdit's Document.m and MultiplePageView.m:
MultiplePageView is a NSView containing as much NSTextViews as necessary to show the complete text. It takes printInfos NSPaperSize for virtual pagination via resizing every page's own textView to fit into it's own page rect leaving enough space for margins.
This way you can easily include textFields, textViews or images as header and footer on every page.
Or draw what ever you like, e.g. page numbers, onto every page in it's drawRect method.

uko
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Printing (From: Carla Lewis <email@hidden>)

  • Prev by Date: Re: NSMovieView Interface Object Question
  • Next by Date: Adding an icon to an application folder
  • Previous by thread: Printing
  • Next by thread: RE: Printing
  • Index(es):
    • Date
    • Thread