Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Can't add ILPDFKit to custom view #59

Open
mob-rockstar opened this issue Jul 14, 2017 · 5 comments
Open

Can't add ILPDFKit to custom view #59

mob-rockstar opened this issue Jul 14, 2017 · 5 comments

Comments

@mob-rockstar
Copy link

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

@codicil
Copy link

codicil commented Jul 20, 2017

@mob-rockstar did you find the answer to your question? can you share if yes

@SaurabhPrajapati
Copy link

SaurabhPrajapati commented Jul 21, 2017

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!

@mob-rockstar
Copy link
Author

mob-rockstar commented Jul 21, 2017 via email

@SaurabhPrajapati
Copy link

first you can download the file from URL , so you get NSData object , then you can use "initWithData" method of ILPDFDocument

@mob-rockstar
Copy link
Author

mob-rockstar commented Jul 21, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants