Bug 66229 - pdftocairo -ps fails with this pdf
Summary: pdftocairo -ps fails with this pdf
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
: 70671 79509 90548 91235 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-26 21:37 UTC by James Cloos
Modified: 2015-09-09 09:43 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Adobe’s Transparency Design Guide (1.04 MB, text/plain)
2013-06-26 21:37 UTC, James Cloos
Details
fix size of transparency group surface (1.96 KB, patch)
2015-08-18 07:18 UTC, Jason Crain
Details | Splinter Review

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.