[cairo] Re: Progress on cairo-based "print to PDF" from Mozilla

Daniel Keep daniel.keep.lists at gmail.com
Fri Jun 16 00:30:03 PDT 2006


Carl Worth wrote:

> It's time for a status update on how "printing" is looking in cairo
> these days. The baseline I've been using is a "print to file" of the
> Minefield start page in a Mozilla trunk build tweaked to use cairo's
> PDF backend instead of its PS backend. [*]
>
> [snip]
>
> http://cairographics.org/~cworth/images/minefield-type42.pdf
>
> This looks extremely promising. The upshot is that most of the type3
> font output from the previous test is now emitted as embedded truetype
> fonts instead, (the bitmapped text that still appears as boxes in the
> corner remains a type3 font). The hinting problems are now gone, and
> viewers such as evince and acroread now attempt to provide text
> selection capabilities.
>
> However, I did not succeed at successfully copying any text from this
> document with either viewer. With acroread, the selection bars feel
> twice as tall as they should be and if I try to copy, I end up with
> garbage getting pasted, (in gnome-terminal anyway---and I should say I
> don't think I've ever attempted copy and past from acroread before so
> it's possible there are bugs here that aren't cairo's fault).
>
> But I don't think that cairo is in the clear since evince also fails
> to select text, and it does so quite spectacularly. Take a look at
> this screenshot of krh trying to select something:

I just checked with Acrobat Reader 5 and Foxit reader 1.3 under Windows
XP.  Hopefully this will help :)

First of all, Acrobat displays the file fine, although rendering the
first page can take an *awfully* long time, and uses up about 1/4 of my
system memory doing so.  I'm assuming that's just because of the
A4-sized 300 DPI image.

Again, selecting, copying and then pasting text causes garbage to be
output.  If Acrobat Reader gets it wrong, I'd be inclined to think it's
a problem with Cairo.

Foxit is a little more interesting.  Firstly, the image on the first
page is totally borked.  It appears vertically squished, horizontally
elongated, and cut in half with the bottom half of the image at the top
of the page and the top half at the bottom of the page.  I have *no*
idea how that would happen.  It could just be that Foxit can't cope with
an image quite that big...

The text isn't quite as bad, but there appear to be random letters
missing in the text.  Selecting, copying and attempting to paste either
results in nothing or "!".

(Foxit usually works flawlessly with whatever I throw at it).

Here are some (now un-attached) screenshots of what the pages look like.

http://users.speedlink.com.au/~foboldfky/minefield-type42-page1.jpg
http://users.speedlink.com.au/~foboldfky/minefield-type42-page2.jpg

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the cairo mailing list