[ 
https://issues.apache.org/jira/browse/PDFBOX-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526791#comment-15526791
 ] 

Tilman Hausherr edited comment on PDFBOX-3000 at 9/29/16 5:11 PM:
------------------------------------------------------------------

A difficulty with this issue is that there are many problems, and the files 
very complex (several levels)... I found one file, PDFBOX-1697, which has a 
transparency group but no softmask.

There were several problems:
- page rotation ignored
- cropbox ignored
- getScaleX() and getScaleY() used on rotated AffineTransform
- translation used when only scale was needed
- initial translation ignored, brings weird effects when JPanel is resized 
(could also be seen when resizing old PDFReader application)

The form was drawn badly, and the result was put at the wrong position.

What helped find the bug:
- creating a huge image in TransparencyGroup and saving it
- drawing a red rectangle at the bbox bounds of the TransparencyGroup, to see 
where the content is drawn, when it is drawn outside
- an improved version of the code in PDFBOX-3359 from [~ivanrf]
- reduced versions of the file from PDFBOX-1697, with / without 
cropbox/rotation and only the bare minimum, plus a rectangle to show where the 
transparency group should land.

Improved files:
- bugzilla-852992.pdf (but not perfect)
- gs-bugzilla689518.pdf (but not perfect)
- PDFBOX-1058.pdf page 4 now OK, red ball visible, shadow gone. Page 1 still 
bad.
- PDFBOX-1697.pdf now OK, "COPY" at the correct position
- PDFJS-7378.pdf (but not perfect)

So it's not much. I suspect that the changes help only at the first level, not 
at the next one, maybe because it is wrong to use the page size in "inner" 
levels.



was (Author: tilman):
A difficulty with this issue is that there are many problems, and the files 
very complex (several levels)... I found one file, PDFBOX-1697, which has a 
transparency group but no softmask.

There were several problems:
- page rotation ignored
- cropbox ignored
- getScaleX() and getScaleY() used on rotated AffineTransform
- translation used when only scale was needed
- initial translation ignored, brings weird effects when JPanel is resized 
(could also be seen when resizing old PDFReader application)

The form was drawn badly, and the result was put at the wrong position.

What helped find the bug:
- creating a huge image in TransparencyGroup and saving it
- drawing a red rectangle at the bbox bounds of the TransparencyGroup, to see 
where the content is drawn, when it is drawn outside
- an improved version of the code in PDFBOX-3359 from [~ivanrf]
- reduced versions of the file from PDFBOX-1697, with / without 
cropbox/rotation and only the bare minimum, plus a rectangle to show where the 
transparency group should land.

Improved files:
- bugzilla-852992.pdf (but not perfect)
- gs-bugzilla689518.pdf (but not perfect)
- PDFBOX-1058.pdf page 4 now OK, red ball visible, shadow gone. Page 1 still 
bad.
- PDFBOX-1697.pdf now OK, "COPY" at the correct position

So it's not much. I suspect that the changes help only at the first level, not 
at the next one, maybe because it is wrong to use the page size in "inner" 
levels.


> Transparency Group issues
> -------------------------
>
>                 Key: PDFBOX-3000
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3000
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>             Fix For: 2.1.0
>
>         Attachments: PDFBOX-1697-reduced-rotations.pdf, 
> PDFBOX-3494_reduced.pdf, PDFBox3359PanelTestEnhanced.java, 
> PDFJS-5811-2-p4_reduced-rotations.pdf, softmask-rewrite-alt1.patch, 
> softmask-rewrite.patch
>
>
> This is a follow-up issue for transparency group issues from PDFBOX-2423. 
> More details to come.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to