adeelkhanaslam / ebookdroid

Automatically exported from code.google.com/p/ebookdroid
0 stars 0 forks source link

"Decoder Restarted" problem #795

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Ebookdroid 2.1.9 for Android 4.4.2 on a Samsung Tab Pro.

Problem occurs only in the book 'The Lady Tasting Tea' by David Salsburg (pdf 
file) downloaded from TPB.  I keep getting a little window saying 'decoder 
restarted'.  If I have it set to decode 4 pages and am viewing it in 
single-page mode it seems to be skipping every other page (1, blank, 3, blank, 
5 etc...).  If I set it to vertical scroll, however, it works fine but the 
little 'decoder restarted' message keeps popping up.  It also pops up when 
nothing is happening.

In addition, I frequently get a message that says something like "This document 
misses the following fonts [list follows].  You should get that fonts and put 
the document folder somewhere."  I get this with sufficient frequency that I 
bought the pdf and djvu reader that purports to give me the appropriate fonts;  
however, no change.

Original issue reported on code.google.com by bashley101 on 30 May 2014 at 12:18

GoogleCodeExporter commented 9 years ago
Hi! Concerning the problem of "missing fonts", I think "bashley101" is wrong. 
No software can include all the fonts existing on earth : this is a real 
problem because a PDF file may reference any possible font without embedding 
it. In this case, the book is not readable with the original fonts. This 
problem is well known, but most ebook readers ignore it (even the well-noted 
Moon+ ! ). As far as I know, Ebookdroid is the only software which warns you if 
the original font is missing and which proposes TWO solutions: either copying 
the missing font somewhere into your device, or (following my own suggestion a 
long time ago) using by default a replacement font that belongs to the same 
family. This leads to a not perfect but similar rendering! Very well done!

Original comment by philippe...@gmail.com on 30 May 2014 at 6:43

GoogleCodeExporter commented 9 years ago
Yes. you are right. That message indicates that rendering of the document will 
differ from authored.

EBookDroid always uses some font substitution if there are no exact font found, 
but sometimes it produces strange results. For example: font ArialMT uses 
different character encoding than regular Arial (Helvetica), so document will 
be gibberish. But if you put arialmt.ttf (from your Windows installation of 
some font sites in internet) to /sdcard/fonts (or any other configured in 
settings folder) or just in the same folder as PDF document, it will be 
rendered correctly.

Now, concerning "decoder restarts". As you know, EBookDroid uses third party 
code in the PDF rendering engine. We stated this in about and on main page of 
this site. Unfortunately on some documents that code hangs. On older version of 
EBookDroid when we used that code as library that cused whole EBookDroid 
application to stop responding or crash. When we switched to using engines as 
separate processes it not only allows us to separate EBookDroid to close source 
part and GPL plugins, but allows us to kill and restart rendering engines even 
if they totally hangs. 

You can tune timeout in the performance settings after which EBookDroid decides 
that decoder hangs. For some files (for example scanned PDFs with huge pages, 
runned on non-top devices) this timeout should be set to higher value. If you 
have a powerful device and do not want to wait for pages you can set it to 
lower value.

Please note that "white page" means that request for rendering was sent to 
engine and not yet received and you should wait some time. If engine three 
times failed to render image that page will be shown as "gray page".

So, both of your reported issues not a bugs but a designed behaviour. That's 
why I am marking this issue as "WontFix". 

If you do not like current behaviour, you can try to describe how do you want 
to change it and can investigate what can be done.

Original comment by Andrei.K...@gmail.com on 30 May 2014 at 7:21