[Sugar-devel] [PATCH Browse 0/2] Add support for Export as PDF

Sascha Silbe silbe at activitycentral.com
Sun May 29 10:04:20 EDT 2011


Requests for print functionality in Sugar have been voiced repeatedly,
including during EduJam 2011. Adding support to Browse for exporting the
currently loaded document as PDF is a major step in that direction since
Browse can render (and thus export as PDF) a variety of file formats,
including HTML, bitmap graphics (PNG, JPEG) and SVG.

The Portable Document Format (PDF) is designed to preserve the layout of the
document and thus is poorly suited for applications like "offline" reading of
web pages (there is no re-flowing to suit the dimensions of the screen). For
these tasks there are better solutions like wwwoffle [1], Webified [2] or
creating a derivative of the Help activity [3].

Direct print support has been deliberately omitted. Anything that gets
exported from the learners system should be recorded and preserved in the
Journal. Exporting PDFs from individual activities to the Journal and
implementing print support in a single, specially designed activity that
operates on the PDFs not only ensures that all exports are recorded in
the exact form they left the computer, but also relieves activity authors
from the need to provide print support in their activity. The user won't get
confused by multiple different ways to configure printing from within the
various activities.

Because PDF is a standard interchange format, this also enables more (and
better!) ways of sharing documents (while preserving their exact form) than
printing.

Sascha Silbe (2):
  Generalise GetSourceListener to SaveListener
  Add support for exporting ("printing") to PDF

 browser.py    |   92 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 webtoolbar.py |   10 ++++++
 2 files changed, 93 insertions(+), 9 deletions(-)

[1] http://www.gedanken.demon.co.uk/wwwoffle/
[2] http://wiki.sugarlabs.org/go/Webified
[3] http://activities.sugarlabs.org/en-US/sugar/addon/4051
--
1.7.2.5



More information about the Sugar-devel mailing list