Problem with ebook reader application

471 Views Asked by At

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 inContextCGContextRef)ctx 
{
    CGPDFPageRef page = CGPDFDocumentGetPage(pdf, index + 1);
    CGAffineTransform transform = aspectFit(CGPDFPageGetBoxRect(page, kCGPDFMediaBox), CGContextGetClipBoundingBox(ctx));
    CGContextConcatCTM(ctx, transform);
    CGContextDrawPDFPage(ctx, page);
}

But the problem how can i adjust font or text color ? I am unable to locate any method or delegate which can change the property.

Please Advice.

1

There are 1 best solutions below

0
On BEST ANSWER

You're loading a PDF file. There's no way to adjust the text in that document without manually extracting the text from the file and either regenerating the PDF or doing your own custom document drawing. Notice that iBooks doesn't let you change the font or text color in a PDF, merely zoom in and out on the document.