Our client just purchased a license and we are currently trying to replace UIWebView with RadaeePDF to just view the PDFs. We have some legacy logic that modifies the PDF (not with Radaee) while it is being displayed so we need to reload it. This worked fine with the UIWebView but we can get the reload part to work with Radaee.
The behavior we are experiencing is the PDF not being redrawn until 10-20 seconds or until the user starts scrolling the view. It seems that the thread is waiting for a mutex to be released, but not sure why is the mutex locked.
This is the code that we use to load (and reload) the PDF:
PDF_ERR err = 0;
[m_view removeFromSuperview];
[m_view vClose];
m_doc = [[PDFDoc alloc] init];
err = [m_doc open:path :pwd];
CGRect rect = [[UIScreen mainScreen]bounds];
m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width, rect.size.height-20-44)];
// Disable vertical & horizontal bouncing
m_view.alwaysBounceVertical = NO;
m_view.alwaysBounceHorizontal = NO;
// Set delegate
m_view.delegate = self;
[m_view vOpen :m_doc :(id<PDFViewDelegate>)self];
pagecount = [m_doc pageCount];
[self.pdfArea addSubview:m_view];
[m_view vSetPos:&previousPosition];
Basically the notify_render method is not called immediately but instead after 10 seconds or as soon as the user starts scrolling.
Previously we were reusing the view but then, as you can see, we tried to recreate it completely just to see if it solved the issue.
We have tried calling vRenderAsync and vRenderSync without success. We also tried calling PDFView refresh method in order to trigger UIVIew setNeedsDsplay with no luck either.
Is there any way to force the redraw or a better approach to what we are trying to do?
Thanks