Build on a modern tech stack that integrates tightly with the platform you're working on. We grow with you as your requirements change and your project evolves.
#import <ComPDFKit/ComPDFKit.h>
- (void)viewDidLoad {
[super viewDidLoad];
// Get the path of a PDF
NSString *pdfPath = @"...";
// Initialize a CPDFDocument object with the path to the PDF file
NSURL *url = [NSURL fileURLWithPath:pdfPath];
CPDFDocument *document = [[[CPDFDocument alloc] initWithURL:url] autorelease];
if (document.error && document.error.code != CPDFDocumentPasswordError) {
return;
}
// Initialize a CPDFView object with the size of the entire screen
CPDFView *pdfView = [[[CPDFView alloc] initWithFrame:self.view.bounds] autorelease];
// Set the document to display
pdfView.document = document;
// Add the pdfView to the root view
[self.view addSubview:pdfView];
}
What Our Customers Say