[cairo] Problem with cairo pdf output

Tobias Hoffmann lcairo-list at thax.hardliners.org
Thu Nov 3 13:53:12 UTC 2022


cairo 1.16.0 also exhibits the problem.

AFAICT the difference between "small" and "Virtual Mechanics" in the 
content stream (obj 4) is that only for the "small" an additional "/b14 
gs" command is present:

[...]
q
106.926 93.812 33.621 13.883 re W n
/b14 gs
q
1 0 0 1 106 93 cm
/a0 gs /x7 Do
Q
Q q
148.605 117.57 83.879 14.02 re W n
q
1 0 0 1 148 117 cm
/a0 gs /x8 Do
Q
Q
[...]

The ExtGState definitions says:
/a0 <<
   /CA 1
   /ca 1
 >>
/b14 <<
   /BM /Multiply
 >>

Adding /b14 gs to drawing of the second XObject (i.e. /x8) fixes the output.

Maybe someone with more knowledge about cairo's pdf surface and/or 
pdftocairo can help here?

   Tobias


On 03/11/2022 13:47, Beckmann Urs (ID) wrote:
>
> Dear Cairo developers
>
> The attached pdf small-sample-with-comments.pdf gives incorrect output 
> from pdftocairo -pdf.
>
> The yellow stripe covers the text “Virtual Mechanics”, instead of 
> being transparent. Text “small” instead remains correctly not covered 
> after pdftocairo -pdf.
>
> pdftocairo -png and pdftocairo -ps give correct results. It looks like 
> the problem comes from cairo pdf output engine.
>
> Tested with cairo-version 1.17.4
>
> Kind regards
>
> Urs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20221103/bee303c4/attachment.htm>


More information about the cairo mailing list