17.05.2014 Views

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HKS® colors. The HKS color system is widely used in Germany<br />

and other European countries. <strong>PDFlib</strong> fully supports HKS<br />

colors. All color swatch names from the following digital color<br />

libraries (Farbfächer) can be used (sample swatch names are<br />

provided in parentheses):<br />

> HKS K (Kunstdruckpapier) for gloss art paper, 88 colors<br />

(HKS 43 K)<br />

> HKS N (Naturpapier) for natural paper, 86 colors (HKS 43 N)<br />

> HKS E (Endlospapier) for continuous stationary/coated, 88 colors (HKS 43 E)<br />

> HKS Z (Zeitungspapier) for newsprint, 50 colors (HKS 43 Z)<br />

Commercial <strong>PDFlib</strong> customers can request a text file with the full list of HKS spot color<br />

names from our support.<br />

Spot color names are case-sensitive; use uppercase as shown in the examples. The<br />

HKS prefix must always be provided in the swatch name as shown in the examples.<br />

Generally, HKS color names must be constructed according to one of the following<br />

schemes:<br />

HKS <br />

where is the identifier of the color (e.g., 43) and the abbreviation of the<br />

paper stock in use (e.g., N for natural paper). A single space character must be provided<br />

between the HKS, , and components constituting the swatch name. If a<br />

spot color is requested where the name starts with the HKS prefix, but the name does<br />

not represent a valid HKS color a warning is logged. The following code snippet demonstrates<br />

the use of an HKS color with a tint value of 70 percent:<br />

spot = p.makespotcolor("HKS 38 E");<br />

p.setcolor("fill", "spot", spot, 0.7, 0, 0);<br />

User-defined spot colors. In addition to built-in spot colors as detailed above, <strong>PDFlib</strong><br />

supports custom spot colors. These can be assigned an arbitrary name (which must not<br />

conflict with the name of any built-in color, however) and an alternate color which will<br />

be used for screen preview or low-quality printing, but not for high-quality color separations.<br />

The client is responsible for providing suitable alternate colors for custom spot<br />

colors.<br />

There is no separate <strong>PDFlib</strong> function for setting the alternate color for a new spot color;<br />

instead, the current fill color will be used. Except for an additional call to set the alternate<br />

color, defining and using custom spot colors works similarly to using built-in<br />

spot colors:<br />

p.setcolor("fill", "cmyk", 0.2, 1.0, 0.2, 0); /* define alternate CMYK values */<br />

spot = p.makespotcolor("CompanyLogo"); /* derive a spot color from it */<br />

p.setcolor("fill", "spot", spot, 1, 0, 0); /* set the spot color */<br />

3.5 Working with Color 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!