Re: PDFKit guidance

2008-06-26 Thread Torsten Curdt
OK, guys thanks for the help so far. I've played a bit. The subclassing of PDFDocument and PDFPage was quite straight forward. (Although unexpected as usually everyone tells you usually you don't subclass in Cocoa land) Just out of curiosity I've just compiled it with the 10.4 SDK and it

Re: PDFKit guidance

2008-06-26 Thread Douglas Davidson
On Jun 26, 2008, at 11:54 AM, Torsten Curdt wrote: The subclassing of PDFDocument and PDFPage was quite straight forward. (Although unexpected as usually everyone tells you usually you don't subclass in Cocoa land) I think what we usually say is: don't make subclassing your first

Re: PDFKit guidance

2008-06-24 Thread Adam R. Maxwell
On Jun 23, 2008, at 3:01 PM, John Calhoun wrote: On Jun 21, 2008, at 6:34 PM, Adam R. Maxwell wrote: I appreciated Antonio's (and your) reminder :). If I understand correctly, the OP could create a PDF context with kCGPDFXDestinationOutputProfile set to a grayscale profile QuartzFilters

Re: PDFKit guidance

2008-06-24 Thread John Calhoun
On Jun 24, 2008, at 7:15 AM, Adam R. Maxwell wrote: On Jun 23, 2008, at 3:01 PM, John Calhoun wrote: You can then either apply it to a context (in your PDFPage subclass) with: - (BOOL) applyToContext:(CGContextRef) aContext; Or better still, pass it in the options dictionary to one of

Re: PDFKit guidance

2008-06-23 Thread John Calhoun
On Jun 21, 2008, at 6:34 PM, Adam R. Maxwell wrote: I appreciated Antonio's (and your) reminder :). If I understand correctly, the OP could create a PDF context with kCGPDFXDestinationOutputProfile set to a grayscale profile QuartzFilters make all that a lot simpler. You would create a

Re: PDFKit guidance

2008-06-21 Thread Adam R. Maxwell
On Jun 20, 2008, at 12:53 PM, John Calhoun wrote: On Jun 20, 2008, at 5:21 AM, Adam R. Maxwell wrote: If you want to draw in memory, I think you have to drop down to Quartz; using PDFKit would likely be easier, but it looks like you can only specify a Quartz filter when saving to a file?.

Re: PDFKit guidance

2008-06-20 Thread Torsten Curdt
On Jun 20, 2008, at 02:40, John Calhoun wrote: On Jun 19, 2008, at 4:35 PM, Torsten Curdt wrote: I would like to convert a PDF of any size so it fits to A4/Letter. I would also like to reduce it to gray scale. This all without displaying anything. PDFKit gives you -[PDFPage

Re: PDFKit guidance

2008-06-20 Thread Torsten Curdt
On Jun 20, 2008, at 03:35, Joel Norvell wrote: Torsten, John Calhoun wrote: So, PDF Kit can I think do what you want. I stand corrected! But (to salvage a little face :-) lol ...don't worry you can't go wrong by reading the Cocoa Drawing Guide. Surely will read through that.

Re: PDFKit guidance

2008-06-20 Thread Antonio Nunes
On 20 Jun 2008, at 11:07, Torsten Curdt wrote: you can't go wrong by reading the Cocoa Drawing Guide. Surely will read through that. Because frankly speaking I didn't think this was Quartz related. Well, you need to know how to generally draw in Cocoa, and you need to know how to take

Re: PDFKit guidance

2008-06-20 Thread Torsten Curdt
On Jun 20, 2008, at 13:09, Antonio Nunes wrote: On 20 Jun 2008, at 11:07, Torsten Curdt wrote: you can't go wrong by reading the Cocoa Drawing Guide. Surely will read through that. Because frankly speaking I didn't think this was Quartz related. Well, you need to know how to generally

Re: PDFKit guidance

2008-06-20 Thread Antonio Nunes
On 20 Jun 2008, at 12:47, Torsten Curdt wrote: The scaling is done when a PDFPage needs to be drawn, so you need to implement it in your subclass's drawWithBox: method. Use an affine transform set up to serve your needs and apply it to the current graphics context within the drawWithBox:

Re: PDFKit guidance

2008-06-20 Thread Adam R. Maxwell
On Jun 20, 2008, at 7:47 AM, Torsten Curdt wrote: On Jun 20, 2008, at 13:09, Antonio Nunes wrote: On 20 Jun 2008, at 11:07, Torsten Curdt wrote: you can't go wrong by reading the Cocoa Drawing Guide. Surely will read through that. Because frankly speaking I didn't think this was

Re: PDFKit guidance

2008-06-20 Thread John Calhoun
On Jun 20, 2008, at 5:21 AM, Adam R. Maxwell wrote: If you want to draw in memory, I think you have to drop down to Quartz; using PDFKit would likely be easier, but it looks like you can only specify a Quartz filter when saving to a file?. I think there may be some confusion with regards

Re: PDFKit guidance

2008-06-20 Thread Kai
On 20.6.2008, at 13:47, Torsten Curdt wrote: On Jun 20, 2008, at 13:09, Antonio Nunes wrote: On 20 Jun 2008, at 11:07, Torsten Curdt wrote: you can't go wrong by reading the Cocoa Drawing Guide. Surely will read through that. Because frankly speaking I didn't think this was Quartz

PDFKit guidance

2008-06-19 Thread Torsten Curdt
I have been browsing through PDFKit examples and documentation. But it seems most things are about showing PDFs, searching them or annotating them. I would like to convert a PDF of any size so it fits to A4/Letter. I would also like to reduce it to gray scale. This all without displaying

Re: PDFKit guidance

2008-06-19 Thread John Calhoun
On Jun 19, 2008, at 4:35 PM, Torsten Curdt wrote: I would like to convert a PDF of any size so it fits to A4/Letter. I would also like to reduce it to gray scale. This all without displaying anything. PDFKit gives you -[PDFPage setBounds:forBox] which would easily give you A4/Letter size

Re: PDFKit guidance

2008-06-19 Thread Joel Norvell
Torsten, These aren't really PDFKit issues. PDF is a native Quartz data type. The issues you mentioned, scaling and color, are addressed in the Cocoa Drawing Guide. You probably want to use an Affine Transform for scaling. I'm not sure about how to go grayscale, but looks like NSColorSpace

Re: PDFKit guidance

2008-06-19 Thread Joel Norvell
Torsten, John Calhoun wrote: So, PDF Kit can I think do what you want. I stand corrected! But (to salvage a little face :-) you can't go wrong by reading the Cocoa Drawing Guide. Joel ___ Cocoa-dev mailing list