iOS
ComPDFKit PDF SDK
Guides

Text Reflow

 

Rearrange text to fit the device screen size for displaying same layout by using the following method.

 

NSURL *url = [NSURL fileURLWithPath:pdfPath];
CPDFDocument *document = [[[CPDFDocument alloc] initWithURL:url] autorelease];
CPDFPage *page = [document pageAtIndex:0];

NSRange range = NSMakeRange(0, page.numberOfCharacters);
NSString *string = [page stringForRange:range];