If the particular instance of the Windows GDI is horrible, the notion of having an API providing abstractions to make it convenient to both display and print information is a sound idea. There are a number of approaches under way under Linux and related operating systems:
If a "document" is generated in Postscript form, Ghostscript (or some similar renderer) may be used to display the results that are really targeted to be printed.
This scheme represents the "ultimate" in flexibility, as there is the full power of a Postscript interpreter in the rendering engine.
Unfortunately, the use of an interpreted language does come at a price; validating a PS interpreter is a difficult task, and processing consumes considerable CPU and memory resources.
PDF - Portable Document Format
Adobe created PDF as a multipurpose document format that takes, from Postscript, the display model from Postscript, and adds in some document structure representation information.
It removes the "power" of having a powerful computer language as part of the document representation. It diminishes the complexity of building a PDF renderer, allows faster rendering (no interpreter in the way), and gives tools that read PDF files the benefit of having "analytical" results (e.g. - they can expect to "understand" every bit of the document as you can't insert complex computations).
Since it uses the same data representation model as PostScript, code that generates Postscript may be modified to generate PDF without dramatic difficulty.
While there are dissenting opinions on the merits of PDF as a representation for the long term archival of documents, it seems to be a not unreasonable way to represent documents for display and printing, and there exist several methods of generating PDF documents, including:
ReportLab -- Reporting for the Internet Age
The central core of the ReportLab toolkit is a set of integrated modules for creating PDF documents implemented for the Python programming language environment.
Source code freely available (hosted at SourceForge ), uses the same license as Python .
pj Java-based library that can parse and generate PDF documents.
Presently available gratis; adding crypto functionality is expected in a future (not gratis) release.
Quartz - a history of Apple's new "Quartz" rendering technology, in the perspective of past/competing technologies such as Postscript, PDF, and DPS.
CL-PDF - PDF generator for Common Lisp
Acrobatic Web Page Tools - For Building web pages in PDF
A database reporting tool written in Java that generates output in various forms including PDF.
For further documentation, see PDF Reference Manual (Adobe)
This library seeks to provide an API to allow generation of multiple kinds of output, particularly including PostScript.
The gnome-print API provides a unified way of displaying and printing output using an imaging model very similar to that provided by Postscript. By having its own library, this allows supporting rendering anti-aliased images atop X even though X does not natively support this.
SVG - W3C Scalable Vector Graphics
SVG is a language for describing two-dimensional graphics in XML. SVG allows for three types of graphic objects: vector graphic shapes (e.g., paths consisting of straight lines and curves), images and text. Graphical objects can be grouped, styled, transformed and composited into previously rendered objects. Text can be in any XML namespace suitable to the appplication, which enhances searchability and accessibility of the SVG graphics.
The feature set includes nested transformations, clipping paths, alpha masks, filter effects, template objects and extensibility.
The rendering model appears to be fairly similar to that of Postscript.
Gill - Gnome Illustration App - SVG in GNOME
Sketch - SVG drawing program written using Python and Tk. (hosted at SourceForge ). Also produces PDF output.
EPD - a new encapsulated vectorial graphic format based on the Adobe PDF graphic syntax.