View Single Post
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:	850
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