ILPDFKit
ILPDFKit copied to clipboard
Can't add ILPDFKit to custom view
Dear I am trying to display the PDF to custom view using ILPDFKit , not full screen view controller. Let me know how can I use the ILPDFKit to display the PDF into custom view
@mob-rockstar did you find the answer to your question? can you share if yes
I have tried It with success! you can add ILPDFViewController's view as subView. and is working fine.For example ,
NSString *filePath = @"filepath for your PDF"
ILPDFViewController *pdfController = [[ILPDFViewController alloc]init];
ILPDFDocument *pdfDocument = [[ILPDFDocument alloc]initWithPath:filePath];
[pdfController setDocument: pdfDocument];
[pdfController setDelegate:self];
[pdfController setFrame:self.view.frame];
[self.view addSubview: pdfController.view];
Hope this will help you!
Thanks for your reply. I want to ask you one more thing. Can I use the server url as a filePath of PDF ?
This library can only load pdf from local? I will wait your reply. Regards
On Jul 21, 2017, at 11:04 AM, Saurabh Prajapati [email protected] wrote:
I have tried It with success! you can add ILPDFViewController's view as subView. and is working fine.For example ,
NSString *filePath = @"filepath for your PDF" ILPDFViewController *pdfController = [[ILPDFViewController alloc]init]; ILPDFDocument *pdfDocument = [[ILPDFDocument alloc]initWithPath:filePath]; [pdfController setDocument:pdfCoachingDocument]; [pdfController setDelegate:self]; [pdfController setFrame:self.view.frame]; [self.view addSubview: pdfController.view];
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/derekblair/ILPDFKit/issues/59#issuecomment-316947592, or mute the thread https://github.com/notifications/unsubscribe-auth/AQGxLvd_XUCvS-cLasr6Ir-wPoaglMbkks5sQGmVgaJpZM4OX4El.
first you can download the file from URL , so you get NSData object , then you can use "initWithData" method of ILPDFDocument
I have to display the PDF from server url, not local. If you have any solutions, let me know
On Jul 21, 2017, at 11:37 AM, Saurabh Prajapati [email protected] wrote:
first you can download the file from URL , so you get NSData object , then you can use "initWithData" method of ILPDFDocument
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/derekblair/ILPDFKit/issues/59#issuecomment-316955374, or mute the thread https://github.com/notifications/unsubscribe-auth/AQGxLoP1-nyBXHFNiCPz0Ay-0gXkc46uks5sQHF2gaJpZM4OX4El.