Open GoogleCodeExporter opened 8 years ago
Hello Siva,
I tried doing the same, and found it crashing as well.
Have you found to solve this issue?
Original comment by tanwar.m...@gmail.com
on 20 Sep 2011 at 2:30
Hi everybody ,
Yeah, I found why the apdfviewer project is crashing in Android-3.0 (or
greater versions).
The reason is that , poppler is using AndroidOutputDev.cc file in the native
code, that file has pdf page rendering implemented in skia. They are
creating some path to capture the characters and draw the same path with the
canvas. But this functionality is not supported in Android-3.0 . You can
search for "path" inside the file. It is crashing while getting the path and
drawing the path using canvas.
Since skia is not stable and can be changed from one version release to
another version release , we should not depend on skia to render the pdf
page.
I tried with my own test program to test skia functionality (using path on
canvas) in native code. It is failing. I'm getting the crash.
Solution : There are two solutions : 1. We have to choose some other
rendering device for pdf page like cairo , gdkpixbuf etc.
2. We should wait till
google releases HoneyComb source. By seeing the modifications in the skia
source , we have to modify AndroidOutputDev.cc file to work without crashes.
Original comment by siva4...@gmail.com
on 20 Sep 2011 at 10:30
[deleted comment]
Hi,
You are correct.. canvas->drawPath has some issues, as the points it wants to
draw gets null so its crashes at SkPoint.
SplashOutput can also be used but it has dependency for fontconfig which
android doen't support. We need to override getDisplayFont() in GlobalParams.cc
to get the info about the fonts if we put it inside
/sdcard/<<custom-location>>/fonts.
I build the poppler with splash.
For cairo you mentioned we can have
https://github.com/anoek/android-cairo a port for android so that we can try
and do rendering.
Original comment by tanwar.m...@gmail.com
on 20 Sep 2011 at 1:15
yes.., It is great to hear that you built the poppler with splash. Have you
compiled with the android ndk ? Is it working fine?
Original comment by siva4...@gmail.com
on 20 Sep 2011 at 2:33
Hello,
Yes i build it using ndk. Its having font issues as its not rendering any font.
But Pdfs which has bitmaps are rendering properly. To get fonts, i need to
override getDisplayFont(). Once i get time i will do that.
Meanwhile, i want to know how cairo will resolve the fonts? Has any1 have any
idea.
Original comment by tanwar.m...@gmail.com
on 21 Sep 2011 at 12:15
Original issue reported on code.google.com by
siva4...@gmail.com
on 6 Jul 2011 at 12:55