- Posts: 20
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
can't load network PDF file
- NovaRadaeePdf
- Topic Author
- Offline
- Junior Member
-
Less
More
10 years 6 months ago #9518
by NovaRadaeePdf
Replied by NovaRadaeePdf on topic can't load network PDF file
I have found the reason of slow loading. because I want to make my APP is fluent. so I used the asynchronous processing. but it has extended the loading time. I don't understand why! We only load the PDF on the main thread? And I found load PDF with the main thread in the demo. Why don't we use multithreading and can you tell me how to modify?
- NovaRadaeePdf
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 0
10 years 6 months ago #9522
by NovaRadaeePdf
Replied by NovaRadaeePdf on topic can't load network PDF file
Who can help me?! I'm in a hurry! Thanks!
- NovaRadaeePdf
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 0
10 years 6 months ago #9553
by NovaRadaeePdf
Replied by NovaRadaeePdf on topic can't load network PDF file
Can you answer my question?
10 years 6 months ago #9556
by emanuele
Replied by emanuele on topic can't load network PDF file
Hi,
a process started in in an asynchronous thread, is a low priority process, so the download process could take much time.
You should try to call only the download process on main thread.
a process started in in an asynchronous thread, is a low priority process, so the download process could take much time.
You should try to call only the download process on main thread.
- NovaRadaeePdf
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 0
10 years 6 months ago #9559
by NovaRadaeePdf
Replied by NovaRadaeePdf on topic can't load network PDF file
I want to know do you have a way to solve this problem, asynchronous and fast.
10 years 6 months ago #9560
by emanuele
Replied by emanuele on topic can't load network PDF file
you can do all the operations in background, but, to avoid delays, the PDFOpenStream method and the UI activities should be called on main thread.
Something like:
Something like:
Code:
[self performBlockOnMainThread:^{
[m_pdf PDFOpenStream:httpStream :@""];
m_pdf.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:m_pdf animated:YES];
}];
Time to create page: 0.397 seconds