[OLPC library] questions about PDFs
S Page
info at skierpage.com
Fri Sep 26 18:07:18 EDT 2008
Ahh, several topics dear to my heart.
* Browsing to PDFs is problematic for the reasons you identify and more.
* But anyway, prefer HTML with advanced CSS over PDF for documents.
* And prefer SVG over PDF for figures.
Diane Serley wrote:
> But when I
> attempt to read one, the PDF is "downloaded" from the library directory
> into the Journal. I had expected that Read would launch and read it
> directly, or that it would appear in Browse. But the download means that
> I have 2 copies of the file in my XO: one in the Library and one where
> ever the Journal is storing stuff...
That's right. And every time you navigate to the PDF in Browse and do
the download-Journal-launch dance, another copy of the PDF is added to
the Journal's datastore! I wrote up the issues in
<http://wiki.laptop.org/go/Talk:Read#Many_issues_going_from_Browse_to_PDFs>
, e-mailed "downloaded files and the Journal" to devel at laptop.org
<"http://lists.laptop.org/pipermail/devel/2008-June/015379.html>, see
bugs 8155 and 8330.
On any personal computer the general principle of saving stuff from the
browser is "first check if you've downloaded it already". On the XO
that even applies to local files for Read that OLPC Library presents: to
re-read a PDF document, kids should restart it from the Journal, instead
of returning to pages in Browse and clicking again.
(I haven't checked, does the Sugar documentation mention this)?
Thus the nifty friendly "OLPC Library" start page in Browse encourages a
sub-optimal interaction with PDF documents.
Your idea that Browse should launch Read is what I expected too I'm
pretty sure Browse could pass a URL like http://gutenberg.org/some.pdf
or file:///home/olpc/Library/another.pdf directly to the Read activity
and eliminate the save to datastore and launch from Journal out of the
way. But when this came up on devel at laptop.org people raised issues
with the XO's security model; see bug 6958.
The best way to avoid these problems is to not use PDF. Even if they
were solved, PDF has lots of downsides as a format for the XO. I filed
bug 7898 to suggest the Sugar activity handbook from Ship.2 not be a
PDF, repeating some of the downsides in
<http://wiki.laptop.org/go/Talk:Read#Document_limitations.3F.3F> (the
bug was obsoleted when all built-in bundle-archives were removed). The
killer problem with PDF is it doesn't re-layout when you rotate the
screen, so you can't get appropriate margins for both orientations.
> I made a collection (.xol) of PDFs and it installed fine.
Can you go back and create nice HTML pages from the source material?
The publisher and others should be willing to help.
PDF's pluses include that you can use better typography and control the
fonts. But the Mozilla engine under Browse supports advanced CSS (see
<http://developer.mozilla.org/en/CSS_improvements_in_Firefox_3>) that
allow book-like typography, see e.g. <http://webtypography.net/toc/>.
And if content required a particular font I think OLPC would be amenable
to installing it, or maybe the library content bundle could. Also, CSS
fonts are coming to the next iteration of the Mozilla engine, so HTML
pages can use custom fonts.
Besides books, people use PDF for diagrams and figures. But those are
better done as SVG files that Browse can directly render. I filed bug
7652 that the World Factbook maps that were in the Ship.1 bundled
library should be re-done as SVG. Since SVGs can animate and respond to
JavaScript, someone could do an incredible Browse-based Atlas that lets
you show and hide features like rivers, towns and borders, and even
implement quizzes (hide text labels and respond to clicks). Awesomeness!
> Am I doing something wrong, or is this the expected behaviour?
>
> Because Browse isn't reading it natively, I'm assuming that Browse is
> not set up to deal with the PDF mimetype. Is there a file I can edit to
> get it to recognize the mimetype?
No browser can render PDFs natively. But you can use a plug-in to
render PDFs in a browser, just like Browse-with-Totem can play the OGG
video and audio mime types. There is a browser plug-in for Evince, so
the Read activity could be subsumed into the browser. This was filed as
bug 3212 and possibly another bug, closed invalid. I disagree with
closing it; the submitter plaintively asks
"why should the child have to care that PDF books will be in Read and
HTML books will be in Web"
If someone has Firefox and Evince expertise and wants to experiment on a
Linux box or an XO, they could see how well Evince works as a plug-in,
try passing URLs from the command line to Evince, set up external read:
handlers in Firefox, etc.
But in my opinion, PDF is rarely if ever the best format for presenting
content on the XO.
Cheers,
--
=S Page user:skierpage
More information about the Library
mailing list