[sugar] Viewing PDFs from Browse
Sayamindu Dasgupta
sayamindu
Sun Oct 12 16:49:28 EDT 2008
On Sun, Oct 12, 2008 at 6:07 AM, Gary C Martin <gary at garycmartin.com> wrote:
> On 12 Oct 2008, at 00:26, Sayamindu Dasgupta wrote:
>
>> I was thinking along similar terms, and here's the screenshot of the
>> latest version:
>> http://dev.laptop.org/~sayamindu/pdf_embed/Screenshot.png
>>
>> To get this in your own XO (I used this on a clean install of 767),
>> download the install the following two RPMs:
>>
>> http://dev.laptop.org/~sayamindu/pdf_embed/m4-1.4.10-3.fc9.i386.rpm
>
> I had a minor warning here, but otherwise the installs seems to have worked
> well:
>
> [olpc at xo-05-24-02 ~]$ sudo rpm --install m4-1.4.10-3.fc9.i386.rpm
> install-info: No such file or directory for /usr/share/info/m4.info
>
>>
>> http://dev.laptop.org/~sayamindu/pdf_embed/mozplugger-1.10.1-4.olpc3.i386.rpm
>>
>> The viewer has to be downloaded from
>> http://dev.laptop.org/~sayamindu/pdf_embed/sugar-pdf-viewer.gz, put in
>> /usr/bin, decompressed, and then made executable.
>>
>> If you click on a link to any PDF file in Browse after this, you
>> should get the PDF embedded in the Browse window itself.
>
> Yes, this is great, another big UI improvement!
>
> Now, I did go right for the map pdf content and start zooming way in and
> scrolling around, so I quickly bogged my XO down in CPU and memory, but
> that's just the same as would happen in Read anyway :-) Maybe my eyes are
> cheating me, but the text on the map seems much sharper when zoomed in with
> your new inline pdf viewer, in Read the text seemed to get a little softer
> (like a heavy AA).
>
I don't know why this is happening. I noticed that I do not set the
screen dpi explicitly (as done in Read). I'm not very familiar with
the internals of Poppler/Evince, but maybe that's the reason ?
> I noticed that at start and after a change in zoom, you get very quick
> visual zoom in/out, but if you watch sugar-pdf-viewer (or Read if you do the
> same there) you'll see the process try and hog 100% CPU for perhaps 10-20sec
> (depends on zoom level and pdf size etc). Scrolling at this time is
> obviously painful, I'm assuming it's doing some kind of background render of
> the entire page ? hoping to finish the whole page before you start
> scrolling? Just an observation. I wonder if the busy wait cursor could be
> triggered until the hidden background grinding has completed so the user has
> a visual indication that something is still working away?
>
Sounds look a good thing to do - I'll take a look and try to figure
out how hard that is. I tried this in the ImageViewer activity and it
didn't seem to work though, for some reasons.
>> You can also put the PDFs in the Journal if you want - the "Keep" feature
>> seems to
>> work for both local and remote PDF files.
>
>
> Yes, keep worked for me here, though it gave me a Journal entry called
> 803304.ai when I kept the europe.pdf from the WorldFactBookMaps bundle. The
> 803304.ai entry did open correctly in Read by default when I clicked it ?
> just thought the name was a little odd.
>
The save code tries to use the name defined in the PDF metadata if
possible. If the name is not possible, it uses the filename. Maybe it
would be a good idea to include a "downloaded from Browse" or "saved
from Browse" at the end of the journal entry title ?
> What with this and your light weight image viewer, you're really smoothing
> off some sharp UI corners, for me at least :-)
>
Thanks for the encouragement - it really feels good to hear these :-D
Cheers,
Sayamindu
--
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]
More information about the Sugar-devel
mailing list