[cairo] Cairo in Google Summer of Code

Adrian Johnson ajohnson at redneon.com
Wed Mar 19 06:14:07 PDT 2008


Adib Taraben wrote:

> Ok. I see the point. What about:
> integrate a generic container for metadata. To be used for Author, 
> Copyright, etc. information for PDF.
> That was supposed to be in 1.7.
> Does not sound to overcomplicated.

It is still on the ROADMAP for 1.7.

There are three ways this could be implemented:

1) Implement a PDF specific API. eg
  cairo_pdf_surface_set_metadata()

2) Implement a generic metadata API for setting metadata on any surface.
  eg
  cairo_surface_set_metadata()

3) Implement a PDF specific API that provides a small set of functions
for inserting PDF objects, dictionary entries and content into the PDF
file. The idea here is to allow applications to use all the non graphics
features of PDF without needing to add API for each feature.

I'm not really in favor of #1 unless everyone else thinks it is a good
idea. The problem with adding this API is that each time we add API for
some PDF feature then someone else will want more API for another PDF
feature and we end of needing API for all of the PDF features. However
it may be the case that the need for a PDF metadata API is common enough
to justify adding this API.

#2 would make the most sense if there were other backends that accepted
similar metadata to the PDF backend.

#3 is the approach that I am most interested in. This would give
applications the most control over the PDF output. Once this is
implemented, applications can add support for PDF features without
having to ask cairo to add API then waiting a year for it to be
available in a stable release.

For GSoc, #1 would be too simple.

#2 is also not very much code.

#3 could be a SoC project. I would rate it as hard due to the level of
PDF knowledge required and the difficulty in defining the API.


More information about the cairo mailing list