• 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: RTFD to PDF
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RTFD to PDF


  • Subject: Re: RTFD to PDF
  • From: glenn andreas <email@hidden>
  • Date: Thu, 19 May 2005 09:53:38 -0500


On May 19, 2005, at 7:36 AM, Neil Williams wrote:

Hi

I am aiming to read a RTFD from disk, edit its contents and write the output to a PDF file. I would like the PDF to be a hybrid of text and graphics i.e. not just a bit map representation of the RTFD. Finally, I hope that the PDF page size will be the same as the RTFD template. I will have two templates - US Letter and A4.

I have read the docs and think I can do the above. However, when I test the PDF output with the code below I get an empty PDF. The problem is that myRect is 0 by 0. I have also tried [theTemplate frame] also to get a rectangle but it is 0 by 0 also. BTW the RTFD output is OK so there appears to be no problems with reading the template.

If you're looking to produce PDFs with given page size, or multiple pages, you'll want to look at the printing system.


Roughly, you get an NSPrintInfo instance for the size desired, setJobDisposition to NSPrintSaveJob (and set the string for the file in NSSavePath) as well as any other print options you want.

Then just make an NSPrintOperation with your view and the print info, set to to not show panels, and runOperation.


Glenn Andreas email@hidden <http://www.gandreas.com/> oh my! quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
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


References: 
 >RTFD to PDF (From: Neil Williams <email@hidden>)

  • Prev by Date: Where to learn about key events and firstresponder etc
  • Next by Date: Re: Lost focus ring in entire application
  • Previous by thread: RTFD to PDF
  • Next by thread: need advice on adding a Serialization override in web services
  • Index(es):
    • Date
    • Thread