Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shading pattern regressions #6287

Closed
timvandermeij opened this issue Jul 30, 2015 · 9 comments · Fixed by #6292
Closed

Shading pattern regressions #6287

timvandermeij opened this issue Jul 30, 2015 · 9 comments · Fixed by #6292

Comments

@timvandermeij
Copy link
Contributor

This is a tracking issue after the excellent triage done by @THausherr on several shading pattern issues. The PDF files below worked after #4192 (with the viewer preview at http://107.21.233.14:8877/a2a6295988a73d2/web/viewer.html), but not anymore with the current master.

Below is a list of files that definitely regressed. I have looked through the entire 4-shading-pattern category to create this list. We need to determine the exact cause of the issue.

  1. https://f.cloud.github.com/assets/2175324/261931/2532062c-8d0a-11e2-8fa6-845fdbcb735f.png (from Unsupported shading type: 4 #2948, rename .png to .pdf)
  2. http://www.archimate.nl/content/bestanden/archimate_made_practical_2008-04-28.pdf (from Error rendering images or graph or something like this #3462)
  3. http://files.shareholder.com/downloads/AMDA-MMXS5/0x0x827039/370849E8-1114-474D-963D-74CE277CA3B6/TRIP_1Q15_Investor_Presentation_v3.pdf (from PDF is missing background & has extra artefacts #6183, although this also looked bad in Implements shading types 4-7 #4192, but at least the right pattern was there)
  4. http://ctan.cs.uu.nl/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf (from Interpolation is handled incorrectly. #6231, especially page 128 looked much better in http://107.21.233.14:8877/a10a71131aab410/web/viewer.html)
  5. https://issues.apache.org/jira/secure/attachment/12647093/coons-function.pdf (from Shadings rendered with additional lines #6284, looked almost perfect in http://107.21.233.14:8877/a10a71131aab410/web/viewer.html aside from the lines to the bottom of the page)

I have bisected this with file 1 and found the following:

1e8d70a is the first bad commit
commit 1e8d70a
Author: Yury Delendik [email protected]
Date: Thu Feb 13 08:20:00 2014 -0600

Prescales shading pattern packed data indices

When we find the cause of this problem, we must add tests to avoid any new regressions.

/cc @yurydelendik

@THausherr
Copy link
Contributor

https://issues.apache.org/jira/secure/attachment/12652009/pattern-shading-2-4-idMatrix.pdf
The old version has a small gouraud shaded triangle at the bottom left, the current version doesn't.

Postscript code can be found here:
https://issues.apache.org/jira/browse/PDFBOX-2141

@THausherr
Copy link
Contributor

https://issues.apache.org/jira/secure/attachment/12658599/LATTICE1.pdf
worked partly in the old version (wrong size, tiles missing), but nothing in the new one.

@THausherr
Copy link
Contributor

https://issues.apache.org/jira/secure/attachment/12658600/LATTICE2.pdf
worked partly in the old version (very small), but totally weird stuff in the new version.

@THausherr
Copy link
Contributor

Another one:
https://issues.apache.org/jira/secure/attachment/12646800/eci_altona-test-suite-v2_technical_H.pdf

(That file is impossible to render correctly (even Adobe Reader doesn't render it perfectly) and too complex to debug, but it is a sort of success indicator)

@THausherr
Copy link
Contributor

Yeah, you did it! A lot of problems I mentioned have been fixed. The Gouraud shadings (types 4 and 5) work fine now, although only those without a function. If you look at the ECI file, you will see that it is almost perfect, only the first rectangle is missing, which is a type 1 shading (that isn't supported yet by PDF.js, so it seems). I'll open some new issues about stuff unrelated to the regression that I found in the meantime.

Re "we must add tests to avoid any new regressions", that is why I mentioned that some of the files (those I created for PDFBox) are Apache licensed, so you can use them. I mentioned the PostScript source because that makes it easy to modify them, and they can be converted to PDF with ghostscript.

@timvandermeij
Copy link
Contributor Author

This issue will be closed soon as the patch will be merged. @THausherr Could you create separate issues for the remaining problematic PDFs in this issue that are not related to the regression? Especially for the three that you provided here as they are not tracked elsewhere. Thank you!

@timvandermeij
Copy link
Contributor Author

All PDFs in this issue have either been fixed or are now tracked in separate issues.

@THausherr
Copy link
Contributor

You meant to type "now", I guess...

@timvandermeij
Copy link
Contributor Author

Indeed I did. Corrected :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants