Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : pPDF


cartesius
01-14-2009, 06:17 PM
pPDF stands for poorPDF viewer, aimed at making the reading books experience more pleasurable.
The reason I wrote this alternative pdf viewer for Iliad is that I wasn't particularly happy about using mine to read
pdf files; reading a letter or A4 size page scaled to fit on the 8" screen was just too much strain for my tired eyes.
Zooming was always an alternative but not one I grew particularly fond of.

pPDF is an attempt to solve this by scaling the text content of the pdf file.
The attached pictures show the Iliad's accompanying Open Source Software Notice displayed using original and scaled (~2x)
fonts respectively.
Controls go by stylus :
LOAD : load a pdf file
</>: previous/next page
++/--: scale up/down
1:1: original page size (scaled to fit)
Exit : indeed, quit
Tap the screen (or open file dialog) to refresh.

Install: unzip ppdf_01.zip in a folder on your sd/mmc card; to start select the folder in contentLister view. Should work fine
with sw. 2.12.
Not all pdf content can be properly scaled but for now text (but not type3 fonts) and pictures work.
Just in case you're asking yourself why the large executable: an altered poppler version is statically linked in.
Much functionality is missing at this stage but nevertheless I would appreciate your opinion.

C.

ericshliao
01-14-2009, 06:45 PM
I am trying pPDF right now. It seems GtkFileDialogue is not responding smoothly. So I can't navigate to the directory where I put my pdf files.
I put pdf files in the same directory with pPDF, but it took more than 30 seconds to list files in the directory.
Page-shifting is qute smooth and fast.

cartesius
01-14-2009, 07:16 PM
Thanks for your reply!
Strange behavior; works just fine with my iLiad. I take it you tapped the dialog in order to refresh the screen..
30 secs is too much time to ask for, just to open one file after another; if you can start a (remote) terminal on your iLiad do:
export DISPLAY=:0
ppdf <filename.pdf>

C.

herve
01-15-2009, 07:28 AM
Using the stylus will use much more power. Is it documented how to receive button events?

Also, as your objective is to display the document as large as possible, you could save precious space by removing this toolbar.

Have you considered implementing some fullscreen mode like in the alternative ipdf viewer, to remove the iLiad toolbar at the bottom?

It's glad to see hacking activity on the iLiad.

cartesius
01-15-2009, 02:44 PM
@herve:
100% agree on the stylus comment; the final goal is to use stylus only for file/page navigation.
Full screen mode is a good idea!
What do you mean by : "Is it documented how to receive button events?"

@all : please tell me how do find the "character scaling" working?

C.

dedo
01-15-2009, 06:04 PM
I am trying pPDF right now. It seems GtkFileDialogue is not responding smoothly. So I can't navigate to the directory where I put my pdf files.
I put pdf files in the same directory with pPDF, but it took more than 30 seconds to list files in the directory.
Page-shifting is qute smooth and fast.

Same here.

cartesius
01-18-2009, 09:24 AM
The second pPDF release brings some changes:
* the upper button bar is removed, its functions replaced by iLiad's buttons
* iLiad's lower toolbar should be hidden when starting the application, restored on exit (works with my unit)
* added page bar interaction
* OpenFile dialog made more responsive though still slow: tap the screen somewhere on the dialog's surface (say nearby the "Cancel" button) to refresh
* Button mappings:
- 'Up' short press : open file
- 'Up' long press : exit
- 'Flipbar next' : show next page
- 'Flipbar previous' : show previous page
- 'Confirm' (dot) short press : display document using original size (scaled to fit the screen)
- 'Previous' (up-pointed triangle) short press : increase text (25%) (percentage refers to original font size)
- 'Previous' (up-pointed triangle) long press : increase text (75%)
- 'Next' (down-pointed triangle) short press : decrease text (25%)
- 'Next' (down-pointed triangle) long press : decrease text (75%)

Install : same as before.
Enjoy!

C.

ragar
01-23-2009, 06:33 PM
hello,cartesius I have version 2.12 but not work for me, I could help. thanks

henryhu
01-28-2009, 12:29 AM
pPDF is very cool. It can run smoothly in my Iliad-II, even it can recognize chinese characters.

If we can use contentLister to replace its openfile dialog window, that will be terrific.

Another possible improvement:
1. the graphic in the pdf is too small after you increased the texts' size.
2. In the full screem model, could you help to remove the page indicator? So that will be the real full screem.

ragar
01-28-2009, 07:58 AM
I can explain how to install the pPDF where books are kept to work.

cartesius
01-29-2009, 04:18 AM
henryhu: thanks for the appreciation :-)
: If you mean using it to open files from content Lister, pPDF would open the pdf file given as parameter but you'll have to change the registry.xml file, which in turn will supersede the original ipdf viewer. For now, I "strongly" advice against it.
: If you thought about replacing the Gtk FileDialog with a 'content Lister' type interface, that is a good idea but code has to be first read then written; no time for that yet.
: 1.the graphics in the pdf file (that is bitmaps, jpegs and such) are supposed to be increased by the same percentage as the text was, limited by screen size. Try scaling some more.
: 2. the intention was always to keep the page bar not to go full screen. The thing is, removing it would give at most a marginal two extra text lines to be displayed by loosing the ability to see the current page/ jump to pages. It is of course possible to implement a hide/show feature for the bar but that would take a very precious button resource I intend to use for some other purpose.
Bottom line: the page bar is there to stay ;-)

ragar: I'm not quite sure what your problem is, but please allow a stupid question first: have you installed the developer package on Iliad?

It is good to see someone finds the time to try my sorry little application and let me know about it; thank you!

C.

edl7878
02-02-2009, 02:59 AM
Thanks for ur cool software!!

I have tested it on my iliad 2nd,it is very useful !!!

After installed developer package, this cool software works very nice, and without developer package, it just show blank page.

Thanks!

good153
02-03-2009, 12:57 PM
Thank you very much, Cartesius. You have done a wonderful job here. I don't have to remake every article or book pdf file in order to get clearer view. It saves lots of time and glasses. I am wondering if it is possible to make it remember the last page I have read. Thank you again.

cartesius
02-04-2009, 02:51 PM
Thanks for your kind words people! U keep me motivated to continue working on this viewer...

A piece of advice: when the pdf has some background "image" one gets better results by copying the text into a text editor (keep same page size) and then export to pdf so the background is removed. There is still some work to create the new pdf but at least there is no need to "re-paginate".
Sorry I could not do better... :-(
(The trouble seems to come from the fact that the background is either an image or some image tiles; but pPdf tries to display (and scale) images oblivious to what they were used for...so it ends up to having a lot of images to display and place some text in between and this just doesn't work right.)

I have given some thought on the issue of remembering the page...it annoys me too. To be consistent with the way Iliad works, there should be an xml file next to the pdf containing the necessary details and I am not yet sure how this works... Any better (aka simpler) ideas?

C.

hansel
02-05-2009, 11:23 AM
Hello Cartesius,

Nice work! Will you share the sources for pPDF? I'd like to try it, but I want to know what I install and run on my Iliad... :rolleyes:

I have given some thought on the issue of remembering the page...it annoys me too. To be consistent with the way Iliad works, there should be an xml file next to the pdf containing the necessary details and I am not yet sure how this works... Any better (aka simpler) ideas?

Remembering the page numbers is handled by contenLister, with part of the job delegated to pageBar. contenLister creates and manages the manifest files, where the page is stored. pageBar, contenLister and the viewer are connected by sockets (ipcChannels).

:bookworm:If you want to dive in the sources, ctrl_start_viewer() in contenLister/control.c is a nice start
http://iliad.hpelbers.org/irexdox/contentLister/control_8c.html#5ec34afa0484cca36ee6d8e77b953cdf

Happy Hacking!

cartesius
02-05-2009, 01:40 PM
A! thank you.

I'm not certain, but it seems to me that in order to get contentLister to cooperate with an application, it would have to be registered - same as starting it properly rather than using the "sh" window name hack- so cL would 'know' to create the xml file and pass it to the started application?
Hopefully it's possible to get the pageBar out of the process as I would assume it deals 'only' with the page and not more (remembering the position in a chm file would need some more information)

C.

cartesius
02-27-2009, 01:10 PM
This third version of pPDF adds the much needed page remembering and history (poor man's version, that is).
Install : same as before
Button mappings : first thing you'll see when starting pPDF.

Enjoy!
C.

good153
03-01-2009, 09:47 AM
Thank you so much, Cartesius. I really appreciate your persistence of hard work. I am going to enjoy it a lot. Thanks.

good153
03-01-2009, 10:20 AM
Guys, do you notice that Cartesius just make iRex iLiad being able to reflow pdf? This is huge!!! You should try this good work of Cartesius and express your appreciation. I just cannot thank you enough, Cartesius.

cartesius
03-16-2009, 10:24 AM
The 4th version of pPDF becomes pViewer adding one more file format for you: MSReader lit (non-DRM).

Install: unzip pViewer_04.zip in a folder on your mmc/sd card; tap the installation folder in contentLister to start.
Controls: self-listed.

Lit viewing is based on convertLit, the well-known lit decompression software for Linux.

Enjoy and please report bugs!
C.

ericshliao
03-16-2009, 10:30 AM
The 4th version of pPDF becomes pViewer adding one more file format for you: MSReader lit (non-DRM).

That's really great. There was no lit reader for iLiad.

Ido Ilan
03-16-2009, 05:17 PM
Great, I've been wanting lit reader for a long time.
Great work :D:D:D:D:D:D

:offtopic: Now if only we had an installer for the new fbreader 10.2 :):):):)

ottovdv
03-16-2009, 06:24 PM
thx!
I wasn't using my Iliad very much any more, since I had trouble reading the NRC newspaper, and the characters of a normal A4 pdf were too small, but this makes life nice again.
Thanks!

hansel
03-24-2009, 02:07 PM
Hi Cartesius,

Is pViewer open source? I'd like to look at it, and build it myself...

:thumbsup:Continue the good work,
Hansel.

PS: if you strip the executable, it will be 20% smaller.

henryhu
03-24-2009, 11:21 PM
More cool than ever. C. you are Linux coding master.

ragar
03-28-2009, 01:20 PM
has no function of writing in books by

good153
04-03-2009, 08:44 AM
Thank you very much again, Cartesius. I am now using your 4th version of pPDF. It works perfectly. Thanks a lot for your great effort.

harpum
04-09-2009, 02:36 PM
It is very helpful for usual pdf file. But for mathematics paper, it does not adjust math formula well. Actually, acrobat reader also has same problem.

Thank you for your useful program.

cartesius
05-05-2009, 02:09 PM
The 5th (and final) pViewer version has it's Gtk based file opening dialog replaced by a simpler yet more functional own coded one.

Enjoy,
C.

maxhyl
05-05-2009, 04:21 PM
It is a wonderful app., I like it!
Name of files on Chinese can not be identify.
Any possibility for support Chinese fonts?
(If we might select the preferable fonts)

herbalist
05-05-2009, 11:53 PM
Thank you for the release! I was able to launch the program and open a file - the toolbar disappeared so it did launch - but the zoom function(s) in/out didn't work. Perhaps the full screen patch from ipdf interferes with the functionality? I'll try to uninstall and try again.

cartesius
05-06-2009, 03:00 AM
Thank you for the release! I was able to launch the program and open a file - the toolbar disappeared so it did launch - but the zoom function(s) in/out didn't work. Perhaps the full screen patch from ipdf interferes with the functionality? I'll try to uninstall and try again.

Hi,

I'm not sure what the mentioned patch does but let me know whether removing it fixes the zooming problem.
What kind of file did you load anyway? Pdf / Lit ? Did you try w/ some other file(s) ?

C.

cartesius
05-06-2009, 03:02 AM
Hi Cartesius,

Is pViewer open source? I'd like to look at it, and build it myself...

:thumbsup:Continue the good work,
Hansel.

PS: if you strip the executable, it will be 20% smaller.

Thanks hansel, current version has been stripped...
C.

cartesius
05-06-2009, 03:25 AM
It is very helpful for usual pdf file. But for mathematics paper, it does not adjust math formula well. Actually, acrobat reader also has same problem.

Thank you for your useful program.

The app is intended for use w/ regular pdf files, since the one -and only- reason for programming it, was to be able to read some books in pdf format having letter/A4 page size, which are otherwise difficult to read on Iliad.

You may have noticed that only characters and bitmap images are subject to zooming but anything looking like vector graphics/ drawing disappear. The pdf can contain drawings as it has instructions for that; but I could not find an algorithm that would be lightweight enough to run on Iliad and perform at least some basic shape recognition to allow scaling. I actually tried, but gave up when I found a file containing some oblique lines that turned out the made several rotated "-" character.
Now, equations in pdf fall somewhere in between graphics and characters as they can contain both; the very peculiar elements placing would require powerful recognition algorithms before scaling, which -assuming they can be designed- would most likely run reasonably well on a PC-grade CPU but unlikely on the Iliad's.

regards,
C.

good153
05-07-2009, 01:09 AM
Thank you very much, again, Cartesius. I can't wait to test the fifth pViewer version. Thanks for the hard work.