I am using this code to open PDF
-(void)OpenPDFFile
{
NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsPath = [paths objectAtIndex:0];
NSString *pdfFullPath = [documentsPath stringByAppendingPathComponent:@"ios7.pdf"];
PDFFileStream *stream = [[PDFFileStream alloc] init];
[stream open:pdfFullPath];
[self PDFOpenStream:stream :nil];
/* This works fine*/
//[self PDFOpen:pdfFullPath :nil];
int pageno =1;
// [m_pdf initbar:pageno];
[self PDFThumbNailinit:pageno];
}
When i use "PDFOpen" method to open PDF it works fine, but when i try to open file stream using "PDFOpenStream" method, app crashes at this method.
-(bool)render:(PDFDIB *)dib:(PDFMatrix *)mat:(int)quality
{
return Page_render(m_page, [dib handle], [mat handle], true, quality);
}
In ur sample, when I use "PDFOpenStream" in "selectRightAction" method it works fine. but when i shift this(selectRightAction) method to RDAppDelegate, to bypass RDFileTableController page and open RDPDFViewController directly, same crash occurs. Although "PDFOpen" method works fine from there.
I have no idea whats happening here, what m i missing? Please help.