Archive

Posts Tagged ‘pdf’

WebKitGTK+ Hackfest 2012

December 26th, 2012 6 comments

This year again the WebKitGTK+ hackfest took place at the Igalia office in A Coruña, and this year again it’s been awesome.

My main goal for the hackfest was to implement an extension system for the web process in WebKit2, that would allow, among other things, to access the DOM, which is the major regression of the WebKit2 GTK+ API. The idea was to use the exactly same GObject DOM bindings API we are currently using in WebKit1, so I moved it to a convenient static library and installed the public headers in its own directory making it shareable between WebKit1 and WebKit2. Once GObject DOM bindings were accessible from WebKit2 I wrote a first patch to implement the web extension system providing a new API for extensions to access the DOM.

I also took advantage of the hackfest time, to re-take a task I had pending for some time, adding an API to WebKit2 to handle SSL errors. I didn’t have time to finish the API, but managed to write a first patch to set a policy for SSL errors. For now it only allows to ignore SSL errors and continue the load or make the load fail in case of SSL errors. The idea is to add a new policy to ask the user what to do.

Even though it was not part of my initial plans for the hackfest I ended up working on the document reading integration in Epiphany. I wrote an initial patch for Epiphany to load documents supported by Evince embedded in the window like a web view. There are still a lot of features to integrate like zooming, searching, printing, etc.

Epiphany showing a PDF document

I set a milestone to switch Epiphany to WebKit2 by default at the end of the hackfest, but I didn’t have time to fix all the regressions. We are a lot closer, though.

This event is impossible without the sponsors, thanks!

 

Cairo 1.10

September 7th, 2010 No comments

Yes, it’s true, Cairo 1.10 has been finally released. Chris already summarized two years of development in 60 lines, so I’m going to talk about how this release affects to Evince/Poppler.

Blend Modes

Cairo 1.10 has some new operators inspired by PDF blend modes, that allowed us to easily implement PDF blend modes in the poppler cairo backend

PDF Blend Modes
PDF Blend Modes

Here is an example of a PDF document combining the use of Multiply blend mode with gradients

Scooby gradient rendered with Cairo 1.8
Scooby gradient rendered by poppler with Cairo 1.8
Scooby gradient rendered by poppler with Cairo 1.10
Scooby gradient rendered by poppler with Cairo 1.10
Scooby gradient rendered by xpdf
Scooby gradient rendered by xpdf

Blend modes are also important for annotations, since highlight annotations are usually implemented by using the Multiply blend mode

Performance

There were some PDF documents where the performance of the poppler cairo backend was really bad. It seems that, with such particular documents, poppler was clipping too much. Of course, Chris fixed it, see the screenshot:

Poppler with cairo 1.8 and 1.10
Poppler with cairo 1.8 and 1.10

Output file size when printing

Thanks to cairo_surface_set_mime_data now we can attach the original uncompressed image to the ps/pdf surface that will be used when creating the resulting ps/pdf file. It drastically reduces the size of the ps/pdf output files created when printing documents that contain images

Fit to contents/Trim margins

This hasn’t been implemented in Evince yet, but using the new recording surface we can get the page bounding box and use it to implement a new fit to contents zoom mode.

Thanks!

Thank you very much to everybody involved in this release

Categories: freedesktop.org, GNOME Tags: , , ,

Extracting images with Evince

Finally, the patch I wrote to allow extracting images from a PDF has been applied to poppler cvs head (thanks Albert). Evince already supports this feature since 0.7.1 version. Here is a screencast.

Evince images handling
(click to play back, ogg/theora, ~3.0 MBytes)

Images selection is not supported yet, but I’m already working on it ;-)

Evince images selection
Select images
Categories: GNOME Tags: , ,

Google Summer of Code 2007

The list of approved projects has been announced!. Iñigo Martínez, a student from the Universidad del País Vasco, is going to be my student to implement annotations support in Evince. We received more than ten proposals to implement annotations support so the final decision hasn’t been easy. I’ve been talking with Iñigo and he seems to be very motivated so I’m quite sure the project is not going to fail this year. Now is time to work and enjoy hacking!

Categories: GNOME Tags: , ,

Evince attachments

Attachments support is a PDF feature that is not known by many people. However, it’s a nice feature and very useful. You can add any kind of file to a PDF document as an attachment. For example, if you are writing a programming document, you could attach the source code of your examples to the document instead of making a tgz with all of the files (the document itself and the examples).

I thought it could be a funny hack for evince, and I decided to implement it. Finally it has been a really funny hack :-). AFAIK evince is the only free PDF viewer that supports attachments right now. Here is the screenshot:

A PDF document with attachments in evince
A PDF document with attachments in evince

XGN

This weekend I will be, one year more, at XGN in Santiago de Compostela (Galicia, Spain). Personally, the best thing about this party is the opportunity to meet again with all of my friends from linups.

Categories: GNOME Tags: ,

Evince

A few days ago, juanjo talked to me about beamer, a LaTeX class for creating presentations. It’s awesome! You can install it from ubuntu/debian repositories and it comes with a lot of useful themes. Beamer is thought to be used with pdflatex to generate the output, so it uses some pdf features like specialized links.

The other day I noticed that evince doesn’t support all of the links included in a pdf generated by beamer. Concretely the links that are called in the PDF Reference as “Named Actions”. The named actions that a document viewer is expected to support are NextPage, PrevPage, FisrtPage and LastPage, although there could be additional, nonstandard actions, like Find or GoToPage which are used by beamer.

Poppler already supports Named Actions, but poppler-glib doesn’t. I’ve added support for them in poppler-glib and then in evince too. Since we are “freezed” right now, we have to wait until branch for 2.16 to be able to check it in.

I have started a campaign in GSyC in favour of evince, since many people are still using xpdf. At the moment it seems that grex is convinced as well as acs who didn’t have to be convinced indeed. The big problem is that most of them are using old evince versions, so I’m pretty sure that, when they upgrade to dapper (at least ubuntu users) and try it out again, they all will change their opinion about evince.

Categories: GNOME Tags: , ,