Bug 97193 - [patch] Add support for custom colors to pdftops 0.46.0 -level1sep
Summary: [patch] Add support for custom colors to pdftops 0.46.0 -level1sep
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-02 19:21 UTC by William Bader
Modified: 2016-11-29 23:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to add -passlevel1customcolor (6.25 KB, patch)
2016-08-02 19:21 UTC, William Bader
Details | Splinter Review
sample file with custom color (166.62 KB, application/pdf)
2016-08-02 19:25 UTC, William Bader
Details

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.