Bug 66229

Summary: pdftocairo -ps fails with this pdf
Product: poppler Reporter: James Cloos <cloos>
Component: cairo backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: devil92666, madbiologist2016, masfia, michael, moo.freedesktop.z.edmcman
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Adobe’s Transparency Design Guide
fix size of transparency group surface

Description James Cloos 2013-06-26 21:37:08 UTC
Created attachment 81515 [details]
Adobe’s Transparency Design Guide

The pdf at:

 http://partners.adobe.com/public/asn/en/print_resource_center/Transparency-DesignGuide.pdf

(also attached) trips up pdftocairo:

:; pdftocairo -ps -level3 Transparency-DesignGuide.pdf out.ps |& uniq -c
     42 BAD status: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
      1 BAD status: invalid vaInternal Error: cairo context error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)<0a>
      1 Internal Error: cairo error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)<0a>
      1 lue (typically too big) for the size of the input (surface, pattern, etc.)
     41 BAD status: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
      1 BAD status: invalid value (typically too bigInternal Error: cairo context error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)<0a>
      1 Internal Error: cairo error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)<0a>
      1 ) for the size of the input (surface, pattern, etc.)
     31 BAD status: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Comment 1 Jason Crain 2015-08-03 01:38:56 UTC
*** Bug 70671 has been marked as a duplicate of this bug. ***
Comment 2 Jason Crain 2015-08-03 01:39:39 UTC
*** Bug 91235 has been marked as a duplicate of this bug. ***
Comment 3 Jason Crain 2015-08-18 07:18:43 UTC
Created attachment 117751 [details] [review]
fix size of transparency group surface

cairo_surface_create_similar_clip calculates an incorrect surface size under rotation.  The right calculation is a bit more involved.  See _cairo_matrix_transform_bounding_box in cairo's cairo-matrix.c (http://cgit.freedesktop.org/cairo/tree/src/cairo-matrix.c#n426).  It requires transforming the four corners of the clip extents and taking the min/max of the results.  Instead, this patch lets cairo handle creating a surface of the right size.
Comment 4 Jason Crain 2015-08-20 07:56:15 UTC
*** Bug 79509 has been marked as a duplicate of this bug. ***
Comment 5 Jason Crain 2015-08-23 03:07:07 UTC
*** Bug 90548 has been marked as a duplicate of this bug. ***
Comment 6 Carlos Garcia Campos 2015-08-31 16:15:36 UTC
Not only fixes the issue but cleans up the code, thanks! I've just pushed it to git master.
Comment 7 Adrian Johnson 2015-09-09 09:43:05 UTC
*** Bug 91931 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.