Hi,
I'm glad to show you my last experiment, a pdf viewer.
No screenshots, sorry, I'm too lazy.
In my tests on my own DR800 is not so slow
Working:
- pdf loading and rendering with acceptable refresh speed (and without pages cache!)
- full page view
- summary view
- table of contents view, clickable
- thumbnails view, stylus-based, clickable
- page bar with chapter marks, clickable (a là FBReader)
- toolbar items (only with Mackx's DR1000 or DR800+)
If I keep interest in it, next steps could be:
- implement a rectangular area zoom (i.e. crop borders)
- bookmarks
- new file selection dialog
- remember book state (page number, zoom, fullscreen, bookmarks, annotations)
- keyboard interaction in thumbnails view
- keyboard dialog based annotations
Never to be implemented:
- other zooms
- continuous and landscape modes
- stylus based annotations
- change font size
. links in .pdf
. find text
Hope you like,
Iñigo Serna
PS: it does not work in the emulator, don't know exactly why, but I think is due to the way rendering and refresh has been implemented. Anyway, it works on the DR
Some notes about the development and code:
- written in vala
- uses own-compiled poppler library, version 0.10.7. Included in the package
This is the latest version compilable with current IREX SDK. Newer versions require much modern stack: glib, cairo, gtk+
- poppler can render pages to cairo context or pixbuf
Rendering to cairo context are faster (sure?) and offer better quality, but the format is less flexible to do manipulations (scale, crop, etc)
I use render to cairo context here and some low level screen refreshes with the help of liberutils at some points. I'm pretty satisfied with the rendering speed, initially I expected lower rates.
Almost 30% of total time of development was spent fighting with rendering and refresh.
Also note pdfviewer does not work (i.e., show page contents) on the emulator.
I'll be travelling next week but I'll try to upload sources to bitbucket repository next week.
Kind regards,
Iñigo Serna
thanks! (works on both DR's )
Very nice,
I like the extra functionality it has over the native pdf viewer.
I immediately added your pdfviewer to the list of 'Open with..' programs (part dr1000hackx), so I can open them directly from the ctb.
A few remarks:
- I am missing the icon in the zip-file.
- Dithering of images is different from the native pdf-viewer, I saw that iRex made a patch to poppler (for R1.7.1), which seems to be related to dithering (or to saving memory...) maybe that will improve dithering.
- There seem to be some refresh problems, mainly when rendering takes too much time. Are you using the sys_set_busy or sys_set_bg_busy?
Looking forward for coming releases.
Thanks both for the feedback,
Quote Mackx
- Dithering of images is different from the native pdf-viewer, I saw that iRex made a patch to poppler (for R1.7.1), which seems to be related to dithering (or to saving memory...) maybe that will improve dithering.
I read a reference about it in an old post from you some days ago...
Ok, IREX is based on v0.8.7. I've attached the diff. Relevant part is at the end of the file.
Quote Mackx
- There seem to be some refresh problems, mainly when rendering takes too much time.
I don't know how to fix without slowing down usual cases.
Quote Mackx
Are you using the sys_set_busy or sys_set_bg_busy?
Nop. Which would be the benefits? turn on the led "only" or does it also avoid enter into micro-suspend mode?
How do you feel about speed?
Any interesting missing feature not mentioned in my first email?
Thanks,
Iñigo
Quote Iñigo
I read a reference about it in an old post from you some days ago...
Ok, IREX is based on v0.8.7. I've attached the diff. Relevant part is at the end of the file.
I will compare the new version with xournal (I noticed that I broke the Import function of Xournal...)
Quote Iñigo
Nop. Which would be the benefits? turn on the led "only" or does it also avoid enter into micro-suspend mode?
Yes you will prevent it from entering micro-suspend, there is a version with 'bg' and a version without. bg is for background, so the bg version will not show the Please Wait dialog.
Quote Iñigo
How do you feel about speed?
Any interesting missing feature not mentioned in my first email?
I did not experiment too much with the speed, so I cannot say anything on the speed. I assume that much could be won when creating a pre-fetch of the next page in the background. Since the one in UDS is broken it could make the reading experience for complicated documents (e.g. magazines) better then with the UDS.
W.r.t. the missing features, I would like annotations, I use it to mark interesting parts in magazines so that I can quickly find them when re-reading the magazines. (This is the reason that I created the 'Import pages with annotations only' function in xournal.) But maybe I can do the same with the text-based annotation that you already planned.
I would like for bookmarks that it is possible to enter a comment, that is what I currently mis in the native version. It should then also be possible to get a text-only overview of bookmarks.
(I will come up with more features when you progress with the implementation :-)
I also noticed some problems with ghosting (when using a magazine with pictures) so you will probably also need to create some 'de-ghosting' algorithm. This will increase the screen refresh-time, but also increase the readability a lot.
For xournal I also had to create a anti-ghosting mechanism.
Very nice
One idea for a future feature (if easy enough to do): a "text selection" mode. This would mean it could be used with Stardict to get translations of selected words (right now only your port of epdfviewer has this ability, but it's hard to use).
Hi, Iñigo.
One question: Is it needed to have the Vala environment installed for this viewer to work? I have tried to use it just copying the files in the archive to the SD Card and executing the PDFViewer shortcut, but I receive an error message, saying (I translate the message in Spanish into English):
"The application 'PDFViewer' cannot be opened. Probably the application is already opened. Close it and try again."
I would like to test your viewer, if it's not complex for me to set it up.
Thanks
Paco
Quote Paquillo
Hi, Iñigo.
One question: Is it needed to have the Vala environment installed for this viewer to work? I have tried to use it just copying the files in the archive to the SD Card and executing the PDFViewer shortcut, but I receive an error message, saying (I translate the message in Spanish into English):
"The application 'PDFViewer' cannot be opened. Probably the application is already opened. Close it and try again."
I would like to test your viewer, if it's not complex for me to set it up.
Thanks
Paco
Hello Paco,
you don't need anything to make it work, just uncompress the package an copy the contents into SD_CARD/Programs folder.
Be sure to use a program like 7zip if you uncompress in a windows machine.
Hope it helps,
Iñigo