• 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: Problem with dataWithPDFInsideRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with dataWithPDFInsideRect


  • Subject: Re: Problem with dataWithPDFInsideRect
  • From: Nicko van Someren <email@hidden>
  • Date: Sat, 12 Nov 2005 12:26:32 +0000

On 12 Nov 2005, at 08:17, Izidor Jerebic wrote:
On Nov 11, 2005, at 8:11 PM, Nicko van Someren wrote:
The problem is that when I use dataWithPDFInsideRect: and save the result to a PDF file the page size for the file is totally wrong. The paths render just fine, way down in the bottom left corner, and I have a huge expanse of empty space above and to the right. Upon closer inspection it turns out that while the rendering of the paths is done with the correct scaling (e.g. it comes out 1280 points wide) the size of the page, in points, is the size of the bounds rectangle in its own internal co-ordinates.

So, the questions to this list are (a) is this a bug and (b) does anyone know a way around this?

As for a): Scaled views do not print correctly to PDF. I reported this bug back in Panther days and it is still open....

Ah well. I'll file a bug report too, so that Apple know that you're not the only one running into this.


As for b): no idea, except manually modifying the PDF file....

Given your reply to (a) I updated the code that sets the frame to construct an NSAffineTransform at the same time, set the bounds to be equal to the frame and then call 'set' on the transform inside the drawRect: method. It now draws correctly to both screen and PDF. That said, it seems a little crazy that I have to do this; after all, what's the point of having separate Frame and Bounds if you have to set them to be the same?


	Cheers,
		Nicko

_______________________________________________
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: 
 >Problem with dataWithPDFInsideRect (From: Nicko van Someren <email@hidden>)
 >Re: Problem with dataWithPDFInsideRect (From: Izidor Jerebic <email@hidden>)

  • Prev by Date: Predicate oddness revisited
  • Next by Date: Browser-like Tab View control
  • Previous by thread: Re: Problem with dataWithPDFInsideRect
  • Next by thread: Re: Problem with dataWithPDFInsideRect
  • Index(es):
    • Date
    • Thread