cgpdfcontext

CGPDFContextCreateWithURL not correctly creating context

Using the following code, the ctx is not correctly being created. It remains nil: #import <QuartzCore/QuartzCore.h> @implementation UIView(PDFWritingAdditions) - (void)renderInPDFFile:(NSString*)path { CGRect mediaBox = self.bounds; CGContextRef ctx = CGPDFContextCreateWithURL((CFURLRef)[NSURL URLWithString:path], &mediaBox, N...

PDF files created on iPad don't display correctly on Windows

My iPhone app creates PDF files (in Arial font). The plain iPhone 3.1.x version works great (other than the known issue that PDF files created on the iPhone can't be viewed correctly in Google Docs or on the BlackBerry). As I am updating my project for OS 3.2 and the iPad, it works just the same, and the PDF files still look great on th...

Portion from CGPDFPage + Scale (zoom)

I wanna take a rect from CGPDFPage (the portion of image around the user's touch point(x,y)) and scale it by a scaleFactor (ie 2x). Below the code I've used to get CGPDFPage's rect. The problem with it is the scaleFactor support. The idea is: 1) pageRect size is pageRect.size *2 2) myThumbRect (the region to zoom) become resultImageSize/...

Problem with ebook reader application

I am working on a ebook reader application... i can able to work exactly as iBooks application does. I have used : CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("paper.pdf"), NULL, NULL); pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CFRelease(pdfURL); - (void) renderPageAtIndexNSUInteger)index inCon...

iPhone/iPad draw pdf like iBooks?

Hello, Does anyone know how to use core graphics to draw a pdf like in iBooks. I can already draw a pdf page using core graphics but was curious how iBooks shows a lower quality view of each page so it loads fast and then when you stay on a page longer it renders it a full quality. This makes it able to open the pdf without having to ma...

PDFContext and Registration color

Hello. If there a way to set the "registration color" (all components 100%) in the CGPDFContext? Context deals with this color in source and target documents (I can open a PDF, re-save it and registration color is preserved), but I can't find a way to draw a line or fill a rect with this color. I have played a lot with NSColor and color...