Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 04-24-2010, 12:00 AM   #1
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
TechPDF: Yet another PDF reader (technology preview)

Knowing in advance that I would be dissatisfied with the PDF reading on the IREX, I planned to write my own. And now I have! This is a PDF reader aimed towards those who usually read technical papers.

Features:
  • Rather than using general-purpose pan and zoom, uses a set of predefined "strategies". This simplifies use at the cost of generality.
  • One strategy is two-column mode, with which it splits columns. That is, the page will be viewed in two parts (landscape mode), the first part will be the top-left and bottom-left of the original page, and the second part will be the top-right and bottom-right of the original page. This way, two-column pages can be read completely with only one refresh.
  • Since the strategies always define exactly how much to move, moving about the page never depends on exactly how much you've zoomed. For example, the "half page" and "two-column" strategies will always get from one page to the next in two steps.
  • Margins are eliminated before display, utilizing as much screen space as is feasible.

Unfeatures (features I don't have, and may or may not have in the future):
  • No explicit pan and zoom. The main reason for adding this feature to TechPDF (the entire point of which is to NOT have explicit pan and zoom) would be for the occasional graph or figure that spans the page in an unusual, strategy-defiant way.
  • No annotations/scribbling.
  • No bookmarks or other such memory.
  • No support for PDFs with DRM.
  • No memory of what file or page you left on, what strategy you last used, etc. This would be nice for the common case of re-viewing the same file.

Bugs:
  • FIXED in alpha5: Doesn't use the nice DR800 menu in any way, instead uses its own bar at the top of the screen.
  • FIXED in alpha2: Screen refreshes more often than it ought to (two refreshes for every page turn)
  • Sorta FIXED in alpha2: The initial file selection dialog is tiny and not easy to use.
  • FIXED (whatever that means) in alpha5: The code is hideously ugly, as it's a horrible amalgam of gtk-splash-test.cc from poppler and my weird strategy system. Needs some rearchitecting.
  • Many, many more!

This is just a technology preview. I am not finished with this, but I'm at a point where it works so I'd like to show it off and ask other peoples' opinions. Here's the basic usage:

Extract the .zip to your SD card. When TechPDF is run, it presents the user with a dialog to select a PDF file. It will normally look in the Books directory, but if you have a Books/TechPDF directory or TechPDF directory, it will prefer those (so you can organize as you please). When you've selected a file, it displays it in full-page mode, which is more-or-less exactly like the default in the standard IREX PDF viewer. You may at this point rotate as you please, and choose a strategy from the menu. When a strategy is chosen, it will refresh the screen into that strategy (duh). You can skip pages with the "go to page" optoin, and close the application also from the menu. Navigation is as per normal, flipbar or onscreen.

If anybody finds this interesting or has comments or suggestions, feel free, I'd love your input.

Source and binaries available at https://dev.mobileread.com/trac/tech...rsion0.0Alpha8

Change log:
  • 0.0 alpha 8: Fixed a memory leak and some inefficient use of memory
  • 0.0 alpha 7: Mainly speed improvements (still not as fast as the builtin one, or even close to ... )
  • 0.0 alpha 6: Fixed a bug causing the two-column mode to display improperly
  • 0.0 alpha 5: Now uses the DR's standard menu rather than building its own
  • 0.0 alpha 4: Added margin elimination.
Attached Thumbnails
Click image for larger version

Name:	techpdf-0.0-alpha6.png
Views:	851
Size:	322.5 KB
ID:	50500  

Last edited by GregorRichards; 04-27-2010 at 05:34 PM. Reason: New version
GregorRichards is offline   Reply With Quote
Old 04-24-2010, 01:55 AM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by GregorRichards View Post
Screen refreshes more often than it ought to (two refreshes for every page turn)
Maybe this line can help:
GTK_WIDGET_UNSET_FLAGS (widget, GTK_DOUBLE_BUFFERED);

The problem of flickering also happens on iLiad. And it's still mysterious for me after so many trial and error. Sometimes, I can solve it with certain technique, sometimes, I can't.
ericshliao is offline   Reply With Quote
Advert
Old 04-24-2010, 04:44 AM   #3
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by GregorRichards View Post
Knowing in advance that I would be dissatisfied with the PDF reading on the IREX, I planned to write my own. And now I have! This is a PDF reader aimed towards those who usually read technical papers.

Features:
  • Rather than using general-purpose pan and zoom, uses a set of predefined "strategies". This simplifies use at the cost of generality.
  • One strategy is two-column mode, with which it splits columns. That is, the page will be viewed in two parts (landscape mode), the first part will be the top-left and bottom-left of the original page, and the second part will be the top-right and bottom-right of the original page. This way, two-column pages can be read completely with only one refresh.
  • Since the strategies always define exactly how much to move, moving about the page never depends on exactly how much you've zoomed. For example, the "half page" and "two-column" strategies will always get from one page to the next in two steps.

Unfeatures (features I don't have, and may or may not have in the future):
  • No explicit zoom. Margins can, as such, be annoying. This goes against the design intent, but some smart margin elimination may be nice.
  • No annotations/scribbling.
  • No bookmarks or other such memory.
  • No support for PDFs with DRM.

Bugs:
  • Doesn't use the nice DR800 menu in any way, instead uses its own bar at the top of the screen.
  • FIXED in alpha2: Screen refreshes more often than it ought to (two refreshes for every page turn)
  • Partially FIXED in alpha2: The initial file selection dialog is tiny and not easy to use.
  • The code is hideously ugly, as it's a horrible amalgam of gtk-splash-test.cc from poppler and my weird strategy system. Needs some rearchitecting.
  • Many, many more!

This is just a technology preview. I am not finished with this, but I'm at a point where it works so I'd like to show it off and ask other peoples' opinions. Here's the basic usage:

Extract the .zip to your SD card. When TechPDF is run, it presents the user with a dialog to select a PDF file. This starts in the "TechPDF" directory on the SD card. (I didn't want to take one of the preexisting directories :P). When you've selected a file, it displays it in full-page mode, which is more-or-less exactly like the default in the standard IREX PDF viewer. You may at this point rotate as you please, and choose a strategy from the menu at the top of the screen. When a strategy is chosen, it will refresh the screen into that strategy (duh). You can skip pages with the "go to page" button, and close the application with the "X" button.

If anybody finds this interesting or has comments or suggestions, feel free, I'd love your input.

Source and binaries available at https://dev.mobileread.com/trac/tech...rsion0.0Alpha2
This, and your previous ports for DR800, look fantastic.
One note: if you don't use iRex bottom bar maybe you could make your app fullscreen.

Iņigo
Iņigo is offline   Reply With Quote
Old 04-24-2010, 06:40 AM   #4
javifields
Enthusiast
javifields began at the beginning.
 
javifields's Avatar
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: Irex DR800S
Thank you GregorRichards!
One question: what is the path (starting from / ) to the books folder of the SD card?
(I am not able to find the pdf files)
javifields is offline   Reply With Quote
Old 04-24-2010, 06:55 AM   #5
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by javifields View Post
Thank you GregorRichards!
One question: what is the path (starting from / ) to the books folder of the SD card?
(I am not able to find the pdf files)
Code:
/media/mmcblk0p1/Books
Iņigo is offline   Reply With Quote
Advert
Old 04-24-2010, 07:04 AM   #6
javifields
Enthusiast
javifields began at the beginning.
 
javifields's Avatar
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: Irex DR800S
Thanks! It works nicely for reading two column papers!
javifields is offline   Reply With Quote
Old 04-24-2010, 09:14 AM   #7
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
Quote:
Originally Posted by Iņigo View Post
This, and your previous ports for DR800, look fantastic.
One note: if you don't use iRex bottom bar maybe you could make your app fullscreen.

Iņigo
I'd rather just make it use the bottom bar
GregorRichards is offline   Reply With Quote
Old 04-24-2010, 09:35 AM   #8
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
Quote:
Originally Posted by GregorRichards View Post
I'd rather just make it use the bottom bar
It's just occurred to me how ridiculous this is ... why do I care whether it's /their/ bar or /my/ bar? Changed my mind, thanks for the suggestion, I'll just take over for now.
GregorRichards is offline   Reply With Quote
Old 04-24-2010, 02:55 PM   #9
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
Just released alpha 4, which adds margin elimination. This is gettin' pretty OK
GregorRichards is offline   Reply With Quote
Old 04-24-2010, 03:22 PM   #10
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Hi GregorRichards,

What's the purpose of "/media/mmcblk0p1/TechPDF" directory created in the shell script?

I presume is the place you store the scientific .pdf files you aim to read with TechPDF.
If it is, I think is a bad idea because it pollutes the SD file system.

Another approach could be to pass an argument in the shell script with the initial path.
Iņigo is offline   Reply With Quote
Old 04-24-2010, 04:06 PM   #11
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
Quote:
Originally Posted by Iņigo View Post
I presume is the place you store the scientific .pdf files you aim to read with TechPDF.
If it is, I think is a bad idea because it pollutes the SD file system.
That's the idea. It's a matter of organization ... they're not books, they're not personal documents, they're not news, and they're not something that I (at least, me personally) want to pollute the /rest/ of the SD filesystem. Perhaps the superior option would be to use TechPDF iff it exists, otherwise start in Books?
GregorRichards is offline   Reply With Quote
Old 04-24-2010, 04:40 PM   #12
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by GregorRichards View Post
That's the idea. It's a matter of organization ... they're not books, they're not personal documents, they're not news, and they're not something that I (at least, me personally) want to pollute the /rest/ of the SD filesystem. Perhaps the superior option would be to use TechPDF iff it exists, otherwise start in Books?
I use a some custom directories in "Personal Documents", but it's a matter of personal preferences.
Iņigo is offline   Reply With Quote
Old 04-25-2010, 04:27 AM   #13
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by GregorRichards View Post
Just released alpha 4, which adds margin elimination. This is gettin' pretty OK
Hi GregorRichards,

Great to see how much effort you spend on improving your application. Did you also have a look at the (old) pdf viewer implementation of iRex which was used in the R1.7 firmware of the DR1000 (also uses poppler)? See the published source code: document-viewer-plugins\plugins\pdf. The file src/pdf_page.cpp, for example, also contains code to calculate the bounding box (PDFPage::get_content_from_bitmap) maybe there is more code you can reuse?
Mackx is offline   Reply With Quote
Old 04-25-2010, 11:25 AM   #14
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
Quote:
Originally Posted by Mackx View Post
Hi GregorRichards,

Great to see how much effort you spend on improving your application. Did you also have a look at the (old) pdf viewer implementation of iRex which was used in the R1.7 firmware of the DR1000 (also uses poppler)? See the published source code: document-viewer-plugins\plugins\pdf. The file src/pdf_page.cpp, for example, also contains code to calculate the bounding box (PDFPage::get_content_from_bitmap) maybe there is more code you can reuse?
Feh, I knew the code would be laying around somewhere, but I couldn't find it ... I'll look in to it.
GregorRichards is offline   Reply With Quote
Old 04-25-2010, 01:32 PM   #15
GregorRichards
Connoisseur
GregorRichards doesn't litterGregorRichards doesn't litter
 
Posts: 60
Karma: 151
Join Date: Apr 2010
Device: DR800SG
Just released alpha 5, which properly uses the DR's menu system, hooray
GregorRichards is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sony Reader Guide for creating optimized PDF content - Exclusive Preview Bob Russell Sony Reader 51 06-22-2011 11:31 AM
cropping pdf with preview wang960 Sony Reader 2 05-05-2009 09:28 AM
Things appearing differently on Calibre preview and on reader ficbot Calibre 6 03-27-2009 04:05 AM
Sony Reader preview by Associated Press doctorow Sony Reader 0 09-26-2006 07:49 PM
MSN Search Technology Preview 2 Colin Dunstan Lounge 0 10-05-2004 04:57 AM


All times are GMT -4. The time now is 07:45 PM.


MobileRead.com is a privately owned, operated and funded community.