Pregunta

Estoy trabajando en una aplicación de lector de libros electrónicos ... Puedo trabajar exactamente como lo hace la aplicación iBooks. He utilizado:

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);
}

Pero el problema ¿Cómo puedo ajustar el color de la fuente o el texto?No puedo localizar ningún método o delegado que pueda cambiar la propiedad.

por favor conseje.

¿Fue útil?

Solución

Está cargando un archivo PDF.No hay forma de ajustar el texto en ese documento sin extraer manualmente el texto del archivo y regenerar el PDF o hacer su propio dibujo de documentos personalizados.Observe que los iBooks no le permiten cambiar la fuente o el color de texto en un PDF, simplemente acercar y alejar el documento.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top