Rockbox Technical Forums

Support and General Use => Plugins/Viewers => Topic started by: PigMaster on January 29, 2007, 11:16:04 PM

Title: PDF Viewer?
Post by: PigMaster on January 29, 2007, 11:16:04 PM
Hello all.
No, I'm NOT making a feature request (I know where they go, don't worry...), just wondering why there doesn't seem to be any developer interest in the idea of a PDF viewer.

http://www.rockbox.org/tracker/task/2613

I think it would be a great idea. If PDFs would be too hard to render or a view too hard to code, would there be any interest in a HTML viewer? (I might just add that to the feature request)

Cheers.
Title: Re: PDF Viewer?
Post by: Genre9mp3 on January 30, 2007, 04:55:43 AM
... PDFs would be too hard to render or a view too hard to code ...

You answered your question yourself!

Also about HTML, it maybe easier code-wise to get implemented compared to PDF but again, there would be many obstacles and problems to overcome (how to display pictures, different fonts etc.) that wouldn't worth the result of viewing html pages on such small screens. Besides, there are more interesting things for the developers to work on.
Title: Re: PDF Viewer?
Post by: GodEater on January 30, 2007, 11:13:29 AM
There are already feature requests for the HTML viewer - and I think most of them get closed with a reason something like "hahahaha - no."

HTML would be a complete nightmare to try and parse, let alone display on a hand held target.

Have you ever asked yourself why pocket interet explorer on WinCE devices sucks so much ?
Title: Re: PDF Viewer?
Post by: Yotto on January 30, 2007, 08:33:40 PM
Have you ever asked yourself why pocket interet explorer on WinCE devices sucks so much ?

One thing I have never ever asked myself is why Internet Explorer on WinCE sucks so much.

On topic, most PDFs need at *least* an 800x600 screen to render well, and a lot of them aren't text, but compressed images of the pages.  The idea of scrolling back and forth for *every line* of text I'm reading makes me shudder.
Title: Re: PDF Viewer?
Post by: MaximillionUnlimited on January 30, 2007, 08:56:28 PM
Even though PDF viewer sounds cool im gona have to go with the guy above me to complicated even if they could make it view it. If they found some way of viewing it like 1 page at a time and the zoom feature combinded with a scroll then maybe there would be a chance. But that would be a pain of code.
Title: Re: PDF Viewer?
Post by: soap on January 31, 2007, 01:18:27 PM
Porting/creating a project like Plucker http://www.plkr.org/ would be more reasonable.  Desktop side parsing and conversion with only the viewing side of the equation done player side.
Title: Re: PDF Viewer?
Post by: man on January 31, 2007, 04:39:30 PM
hmm... and what about porting a text-base open-source browser like ELinks (http://www.elinks.cz) to Rockbox?
Title: Re: PDF Viewer?
Post by: Genre9mp3 on January 31, 2007, 05:01:29 PM
ELinks seems to be a very nice and interesting project overall but again... it doesn't worth to port such a thing in Rockbox! IMO, even on the biggest screens (Gigabeat/iPod Video) it would be a pain to read html pages. Besides, what html files would someone carry with him/her? The only useful thing I can think of is the html manual. But even on this, a txt file of that would be equally good.
Title: Re: PDF Viewer?
Post by: GodEater on February 01, 2007, 03:25:38 AM
hmm... and what about porting a text-base open-source browser like ELinks (http://www.elinks.cz) to Rockbox?

The problem you'll find with most of these projects that are designed for actual computers, and not handheld devices, is that they will make extensive use of malloc() calls all the way through them (or equivalents). Rockbox has no support for such a function, and not only are there no plans to make one, there are very vocal people wielding pitchforks that hunt down and burn people that suggest we ought to include one.

Even if those vocal people could be silenced, and convinced not to hurt people that suggested such a thing - you're then talking about two lots of things which need to happen. Firstly, the system programmers, the ones who actually write rockbox would have to work out how to properly implement malloc() in rockbox. This is not a trivial problem to solve on hardware which mostly doesn't include an MMU. Secondly, the application programmers, the hypothetical people who are going to do the port, are going to have to sit down and work out how to make elinks work properly on such a tiny target.

In short - I think hell will freeze over long before you see a port of elinks to rockbox. But I'm willing to be proved wrong.
Title: Re: PDF Viewer?
Post by: nbigaouette on March 08, 2007, 06:59:46 PM
Porting/creating a project like Plucker http://www.plkr.org/ would be more reasonable.  Desktop side parsing and conversion with only the viewing side of the equation done player side.
I use Plucker on my Palm Zire 21 (1 bit color depth, small screen) and it is really great. Even on that kind of screen the rendering is really good.

The problem you'll find with most of these projects that are designed for actual computers, and not handheld devices [...]
Plucker was designed for handheld devices. I don't know if it uses mallocs but it wasn't designed for computers. Hence it is a good candidate for document viewer on RockBox.

I think it could be quite interesting to see Plucker on rockbox. Each morning I was downloading my news and with plucker I read it in the metro.

Unfortunatly I never managed to view pdf on the palm. Is it possible to convert a pdf to a plucker file?
Title: Re: PDF Viewer?
Post by: soap on March 09, 2007, 12:17:17 AM
The whole point (IMHO) of PDF is to preserve layout across a variety of platforms.
All the Rockbox targets have screens too small to present (in a usable form) the layout of all but the simplest and smallest of pages.
That is why I, personally, think the idea of PDF on Rockbox is silly.
I have, though, long been a supporter of Plucker on Rockbox.  I obviously haven't put my time where my mouth is and tried to port it.
Title: Re: PDF Viewer?
Post by: nbigaouette on March 09, 2007, 12:13:19 PM
PDF was created for layout preservation on multiple targets. But this is not its only use today. I think an important use, if not the first, is that PDF prevent editing. Documents can be given without fear of it being modified (Sending of an homework as PDF in an email. You could always argue that the copy the corrector received is not the same you have sent if it was in doc format.)

I don't think it would be silly to (try) display a PDF on rockbox. I would like being able to read some PDF files on my rockboxed iriver H10 (160x128x16). I think it could be possible to convert PDF to html and then to plucker.

So the bottom line would be try to port plucker, then try something about PDF ;)

Title: Re: PDF Viewer?
Post by: GodEater on March 09, 2007, 02:36:58 PM
Well don't let my comments stop you. If you want it that badly, and think it won't look rubbish - by all means go ahead.
Title: Re: PDF Viewer?
Post by: caw on September 06, 2007, 11:38:36 AM
Just wondering if anyone has looked into porting plucker to rockbox. I use plucker all the time on my Sony Clie, and being able to use it on rockboxed devices would, well, rock!
Title: Re: PDF Viewer?
Post by: LambdaCalculus on September 06, 2007, 11:43:55 AM
Well, Plucker is GPL software, and the source is available, so why don't you download the source and start some research on it?
Title: Re: PDF Viewer?
Post by: bluebrother on September 06, 2007, 03:44:15 PM
Plucker is some sort of compressed HTML. So there are still issues because we don't have multifont support and only limited image display functionality:
- Websites usually use jpg or gif for images. Currently there is no gif viewer around, and to support both formats in a plucker / html viewer it would also be needed to use that functionality outside of the appropriate viewer. png is also a format that might be considered.
- we have no possibility to display text bold, italic, underlined, scaled up etc. This will make html pages a simple long text. So to make such a viewer useful at least some basic font adjustements would be necessary, i.e. support boldening / underlining the text. Not all possible font manipulations would be needed though. But it would be quite some work ...
Title: Re: PDF Viewer?
Post by: LambdaCalculus on September 06, 2007, 03:54:50 PM
- we have no possibility to display text bold, italic, underlined, scaled up etc. This will make html pages a simple long text.

Hey, lynx has been working like that for a long time now... :)
Title: Re: PDF Viewer?
Post by: bluebrother on September 06, 2007, 06:38:54 PM
Hey, lynx has been working like that for a long time now... :)
You're right -- but wouldn't it be somewhat strange on a graphical display, especially if that can do colors (like some players do)?
Title: Re: PDF Viewer?
Post by: LambdaCalculus on September 07, 2007, 09:41:01 AM
To many users, yes it would seem strange. But at the same time, it would offer this service to users of greyscale targets as well... :)