Bug 97193

Summary: [patch] Add support for custom colors to pdftops 0.46.0 -level1sep
Product: poppler Reporter: William Bader <williambader>
Component: utilsAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: williambader
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: patch to add -passlevel1customcolor
sample file with custom color

Description William Bader 2016-08-02 19:21:38 UTC
Created attachment 125490 [details] [review]
patch to add -passlevel1customcolor

I need to know both the process and spot colors in a PDF.
pdftops -level1sep converts spot colors to CMYK process color.
pdftops -level2sep preserves spot colors but always writes "%%DocumentProcessColors: Cyan Magenta Yellow Black" if the PDF uses any color.

The attached patch adds a pdftops -passlevel1customcolor option that preserves spot colors. This option affects the output only when using -level1sep. Otherwise it is ignored. pdftops -level1sep continues to convert spot colors to CMYK process color, while pdftops -level1sep -passlevel1customcolor preserves spot colors.

The change is small and should not affect pdftops output unless the new option is used.

The patches also change -level2sep and -level3sep so spot color does not trigger setting the flags to write process color names to the DocumentProcessColors comment. That comment should list only process colors that are really used for process color. It is sufficient to list process colors in the recipe to mix spot colors the CMYKCustomColor comment. For example, an EPS with only spot red needs just
%%DocumentProcessColors: Black
%%DocumentCustomColors: (Red)
%%CMYKCustomColor:
%%+ 0 1 1 0 (Red)
The DocumentCustomColors comment should not list M or Y unless the EPS also has process M or Y in addition to the spot Red.

Regards,
William
Comment 1 William Bader 2016-08-02 19:25:24 UTC
Created attachment 125491 [details]
sample file with custom color
Comment 2 Albert Astals Cid 2016-11-29 23:00:36 UTC
Pushed

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.