Re: Help with PDFPage to NSImage

2008-02-27 Thread Nick Zitzmann
On Feb 27, 2008, at 6:52 AM, Florian Soenens wrote: After googling my error output i discovered a tread about this issue and this is how it get's solved: I need to add this line in the beginning of my main() function: [NSApplication sharedApplication]; Why is this needed as we are talking a

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
After googling my error output i discovered a tread about this issue and this is how it get's solved: I need to add this line in the beginning of my main() function: [NSApplication sharedApplication]; Why is this needed as we are talking about a command line utility?? On 27 Feb 2008, at 14:37,

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 2:13 PM, Florian Soenens wrote: thanks for the quick responses, here's what i noticed: if i comment these tree line (the actual drawing), i do not get an error. //[image lockFocus]; //[pdf_rep drawAtPoint:NSMakePoint(0.0,0.0)]; //[image unlockFocus]; So, it must have to

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Sorry to bother again, i mixed two pieces of code, here's my error output: 2008-02-27 14:35:04.055 ThumbNailFixedWidthLine[28467:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow' 2008-02-27 14:35:04.056 ThumbN

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 1:45 PM, Florian Soenens wrote: The source pdf does display correctly in Preview and i'm using Leopard. Here's my output: 2008-02-27 13:42:14.710 ThumbNailFixedWidthLine[26446:10b] _NXCreateWindow: error setting window property (1002) 2008-02-27 13:42:14.910 ThumbNailFix

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Hi Antonio, my pdf document gets created. The index is also valid. The source pdf does display correctly in Preview and i'm using Leopard. Here's my output: 2008-02-27 13:42:14.710 ThumbNailFixedWidthLine[26446:10b] _NXCreateWindow: error setting window property (1002) 2008-02-27 13:42:14.910

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 10:32 AM, Florian Soenens wrote: i don't understand why this simple code is not working: PDFDocument *pdfDocument = [[PDFDocument alloc] initWithURL:inputurl]; PDFPage *currentPage = [pdfDocument pageAtIndex:i]; NSImage *image = [[NSImage alloc] initWithData:[currentPage d