Bug 690816 - PDF rendering is wrong if PDF contains transparency
Summary: PDF rendering is wrong if PDF contains transparency
Status: NOTIFIED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.70
Hardware: PC Windows XP
: P4 normal
Assignee: Michael Vrhel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-13 03:18 UTC by Leonid Lukomskij
Modified: 2011-09-18 21:47 UTC (History)
0 users

See Also:
Customer: 582
Word Size: ---


Attachments
061208_WF_CMYK_PapaJohns_p2_EV0708_406.pdf (10.33 MB, application/pdf)
2009-10-13 03:20 UTC, Leonid Lukomskij
Details
pj_p2_results.zip (5.74 MB, application/octet-stream)
2009-10-13 03:25 UTC, Leonid Lukomskij
Details
patch (6.18 KB, patch)
2009-10-13 17:27 UTC, Alex Cherepanov
Details | Diff
SeaCreatureCrdNOTFLAT.pdf (454.83 KB, application/pdf)
2009-10-21 08:26 UTC, Leonid Lukomskij
Details
SeaCreature-tiffsep-HEAD.zip (69.97 KB, application/octet-stream)
2009-10-21 08:28 UTC, Leonid Lukomskij
Details
SeaCreature-tiffsep-8.64.zip (84.75 KB, application/octet-stream)
2009-10-21 08:29 UTC, Leonid Lukomskij
Details
bug690816_simple.pdf (2.19 KB, application/pdf)
2009-10-21 09:52 UTC, Michael Vrhel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Lukomskij 2009-10-13 03:18:26 UTC
I tried to generate tiffs from PDF containing transparency. I used tiff32nc and
tiffsep output devices with v. 8.70. Command lines was:

gswin32c.exe -dSAFER -dBATCH -dNOPAUSE -sDEVICE=tiff32nc -r100
-sOutputFile=tiff32nc-8.70.tif 061208_WF_CMYK_PapaJohns_p2_EV0708_406.pdf

and

gswin32c.exe -dSAFER -dBATCH -dNOPAUSE -sDEVICE=tiffsep -r100
-sOutputFile=tiffsep-8.70.tif 061208_WF_CMYK_PapaJohns_p2_EV0708_406.pdf

Output was wrong in both cases.

It seems this is regression. Output files from v. 8.64 looks correct
Comment 1 Leonid Lukomskij 2009-10-13 03:20:17 UTC
Created attachment 5475 [details]
061208_WF_CMYK_PapaJohns_p2_EV0708_406.pdf

This is source file
Comment 2 Leonid Lukomskij 2009-10-13 03:25:20 UTC
Created attachment 5476 [details]
pj_p2_results.zip

This is output files from v. 8.70 and 8.64
Comment 3 Ken Sharp 2009-10-13 03:39:43 UTC
Using the current HEAD revision this works OK for me, using both tiff32nc and
tiffsep, on Windows (32 bit).

Possibly this has been fixed, can you build the latest source and try that ?
Comment 4 Leonid Lukomskij 2009-10-13 07:14:36 UTC
I tried to enter to cvs to build HEAD:

cvs -z3 -d :pserver:anonymous@cvs.ghostscript.com:/cvs/ghostscript login

and pressed enter when it prompts for a password.

I have message:

cvs [login aborted]: connect to cvs.ghostscript.com(207.238.132.61):2401 failed:
Connection refused

What is wrong?
Comment 5 Ken Sharp 2009-10-13 07:20:42 UTC
>cvs [login aborted]: connect to cvs.ghostscript.com(207.238.132.61):2401 failed:
>Connection refused
>
>What is wrong?

Ghostscript uses Subversion, not CVS, the repository is at svn.ghostscript.com
Comment 6 Leonid Lukomskij 2009-10-13 08:17:44 UTC
In any case HEAD version is not what we need because this is development,
unstable version.

Could you send patch for this and only this bug?
Comment 7 Alex Cherepanov 2009-10-13 17:27:11 UTC
Created attachment 5480 [details]
patch

This bug has been fixed by Michael Vrhel  by the rev. 10063 
The diff between v. 10062 and v. 10063 is attached.
This patch is also available at:
http://ghostscript.com/pipermail/gs-cvs/2009-September/009787.html

The patch can be applied to v. 8.70 and appears to fix the problem but this
combination has not been tested for possible regressions.
Comment 8 Leonid Lukomskij 2009-10-14 07:29:57 UTC
I tried your patch. It works with DeviceCMYK color space only (with device
tiff32nc). Results with DeviceN color space (tiffsep) are still wrong.

I tried HEAD version, it works correctly.

We need DeviceN for our purposes.

So question is: is it safe to use HEAD version in production environment?

If no, please, upload new patch, for DeviceN too.
Comment 9 Alex Cherepanov 2009-10-17 18:43:18 UTC
The problems with tiffsep device get fixed by the following revision:

r10062 | mvrhel | 2009-09-09 02:21:02 -0400 (Wed, 09 Sep 2009) | 9 lines
A fix for the rendering issue that occurred with bug 689581 after fixing the
rangecheck error.  This should fix 689581.

This patch depend on some earlier work.

In my unofficial opinion, HEAD is the best version most of the time.
For instance, today's HEAD can has no known problems with JPEG 2000
images. Sometimes, broken code get committed to the head, but pre-commit
and post-commit testing ensures that regressions are rare and short-lived.
Comment 10 Leonid Lukomskij 2009-10-21 08:25:25 UTC
I found file which is rendered correctly with 8.64 and incorrectly with HEAD. 
See attachments. Command line is the same 
Comment 11 Leonid Lukomskij 2009-10-21 08:26:43 UTC
Created attachment 5516 [details]
SeaCreatureCrdNOTFLAT.pdf
Comment 12 Leonid Lukomskij 2009-10-21 08:28:19 UTC
Created attachment 5517 [details]
SeaCreature-tiffsep-HEAD.zip
Comment 13 Leonid Lukomskij 2009-10-21 08:29:10 UTC
Created attachment 5518 [details]
SeaCreature-tiffsep-8.64.zip
Comment 14 Ken Sharp 2009-10-21 08:59:12 UTC
This really ought to be a separate issue, because its a different problem as can
be seen by the fact that tiff32nc works correctly. However... 

The issue seems to be caused by the fact that the PDF file contains a spot
colour PANTONE 2478 CVU.

Non-separating devices such as tiff32nc which convert the spot colour to device
colours work correctly. Checking the spot colour plate its easy to see that the
drop shadow is not being reduced to 0 properly.

One for Michael I think, so reassigning as such.
Comment 15 Michael Vrhel 2009-10-21 09:52:07 UTC
Created attachment 5519 [details]
bug690816_simple.pdf

Here is a simplified version that has the problem.
Comment 16 Michael Vrhel 2009-10-22 00:01:46 UTC
Fixed with revision 10207.
Comment 17 Leonid Lukomskij 2009-11-09 10:51:22 UTC
I tried latest HEAD version (I think this is 10232). 

It works correctly with file SeaCreatureCrdNOTFLAT.pdf (under the same
conditions), but results with file 061208_WF_CMYK_PapaJohns_p2_EV0708_406.pdf
are wrong.

So I'd like to reopen bug
Comment 18 Michael Vrhel 2010-07-02 12:39:49 UTC
This seems to work fine with the head.
Comment 19 Marcos H. Woehrmann 2011-09-18 21:47:50 UTC
Changing customer bugs that have been resolved more than a year ago to closed.