Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top