[cairo] PS level changing

Adrian Johnson ajohnson at redneon.com
Wed Mar 26 04:42:51 PDT 2008


Marek Kasik wrote:
> Hello Carl,
> I wanted to set the PS-level to the maximum PS-level supported by the
> printer. I thought that the PS-level 3 files are smaller than PS-level
> 2 files and that it can improve speed of communication (for example).
> But now I see that Cairo prefers compatibility. So, I will follow this
> policy.
> I wanted to fix bug http://bugzilla.gnome.org/show_bug.cgi?id=509788
> (the compatibility was solved by Cairo 1.5.6, but now it prints with
> PS-level 2 on PS-level 3 printers).

The only PostScript level 3 features cairo supports are linear 
gradients, radial gradients, and Type 3 images (image + mask). Setting 
cairo_ps_surface_restrict_to_level() to level 3 will allow these level 3 
features to be used. If you restrict to level 2, use of these features 
will result in fallback images being used which increases the file size. 
  If you are not using these features you will see no difference in file 
size between restricting to level 2 or level 3.


>   Thanks
> 
>     Marek Kasik
> 
> 
> On Tue, Mar 25, 2008 at 6:50 PM, Carl Worth <cworth at cworth.org> wrote:
>> On Tue, 25 Mar 2008 16:07:31 +0100, "Marek Kasik" wrote:
>>> I would like to ask you one question about Cairo. I need to change PS level
>>> of generated cairo_surface_t from 2 to 3, because of printers which supports
>>> PS level 3 (default level is 2). I tried to use function
>>> cairo_ps_surface_restrict_to_level(), but it doesn't help. It only decreases
>>> the PS level (3 -> 2), but doesn't increase it.
>>> Is there any other way to change the level of generated surface?
>>> I use cairo 1.5.14.
>> Hi Marek,
>>
>> The intent here is that cairo will automatically compute the minimal
>> required PostScript level to capture all of your cairo drawing as
>> accurately as possible, but never to exceed the minimum level you set
>> with cairo_ps_surface_restrict_to_level.
>>
>> That is, if by default cairo is emitting PostScript level 2 rather
>> than PostScript level 3 then that should be because cairo didn't see
>> any benefit that could be obtained with any Level 3-specific feature
>> of PostScript.
>>
>> So what actual problem are you having? Is there some Level 3-specific
>> feature that you wish cairo would take advantage of and it's not?
>>
>> -Carl
>>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo



More information about the cairo mailing list