[poppler] Changes and possible api break in glib frontend for 0.16

Carlos Garcia Campos carlosgc at gnome.org
Tue Jun 15 11:44:50 PDT 2010


Hi all,

there are some planned changes and possible api breakages for this
devel cycle that I would like to comment here.

 - The GDK api will be marked as deprecated for 0.16 and definitely
 removed in 0.17/0.18. In this moment GDK api is just a wrapper over
 the cairo one, so it doesn't make sense to depend on gdk just for
 that.

 - poppler_page_get_selection_region(). This method was already
 changed to return a GList * of PopplerRectangles instead of a
 GdkRegion when we made gdk an optional dependency. Now that gdk
 api is deprecated it probably makes sense to return a cairo_region_t
 * instead. The main problem is that cairo_region is cairo 1.10 api, so
 we need to trust it will be released on August as planned. 

 - poppler_page_get_text(). This method is confusing, it receives a
 PopplerRectangle and PopplerSelectionStyle, so I think it might be
 renamed to poppler_page_get_selected_text(), since it actually
 returns the text contained in the selection contained in the given
 rectangle. Then we can add poppler_page_get_text() as convenient
 method to get the whole text of the page.

 - poppler_page_get_text_layout(). Daniel Garcia is already working on
 this. It returns an array of PopplerRectangles that are the bounding
 boxes of every character in the page. The array index is the
 character offset of the string returned by (the new)
 poppler_page_get_text().

 - printing options. I would like to add a way to specify options when
 rendering for printing, like not rendering annotations. We could add
 an options parameter to poppler_page_render_for_printing() or maybe
 we can avoid breaking the api and just add
 poppler_page_render_for_printing_with_options().

 - In PopplerDocument, linearized property is an string containing
 "Yes" or "No", it should be a boolean. I plan to add accessors for
 all properties in PopplerDocument and PopplerPage, to make properties
 easier to discover.

 - poppler_page_get_bounding_box(). This will be a new method that
 returns the effective bounding box of the page. It would allow
 viewers to implement fit-to-contents zoom as well as FitB*
 destinations. This needs cairo 1.10 (recording surface)

 - GObject introspection support. 
 
I think I don't forget anything. Comments? Objections?

Regards, 
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100615/2994e31e/attachment.pgp>


More information about the poppler mailing list