Re: How can I create PDF with spot color?

Alfred Reibenschuh <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

AAA wrote:
> Hi all,
> 
> I am confused. How can I create PDF with spot colors?
> 
> In API2 I only see the following sample code.
> ---------------------------------------------------------------------
> 1    $cy = $pdf->colorspace_separation('Cyan',    '%f000');
> 2    $ma = $pdf->colorspace_separation('Magenta', '%0f00');
> 3    $ye = $pdf->colorspace_separation('Yellow',  '%00f0');
> 4    $bk = $pdf->colorspace_separation('Black',   '%000f');
> 5    $pms023 = $pdf->colorspace_separation('PANTONE 032CV', '%0ff0');
> 6    $dncs = $pdf->colorspace_devicen( [ $cy,$ma,$ye,$bk,$pms023 ] );
> ---------------------------------------------------------------------
> 
> My understanding is line 5 is make a separated colorspace 
> for 'PANTONE 032CV', which is red ('%0ff0') in CMYK.
> 
> What to do next? I did $txt->fillcolor($pms023, 100); but didn't 
> work. 
> 
> thanks a lot.

what you call "spot color" is a "separation colorspace" in pdf-speech.

at first you must know the name of the spot-color your output-device
supports eg "Orange" and an emulation value usually in CMYK eg "%03f0".

looking at example "032_separation" we get:

my $csp=$pdf->colorspace_separation('Orange', '%03f0');

$gfx->fillcolor($csp, $tint);


where $tint ranges from 0.0 to 1.0


DeviceN colorspaces on the other side are usually for Images.


(please note that both colorspaces are "linearly sampled",
so $tint might need to be adjusted for gamma if you know what i mean)


C

fredo
- --
Schonmal davon gehoert, dass nicht jeder linux user gleich ein
programmierer ist, der alles, was er selber braucht, auch selber
programmiert, installiert, patched, hacked oder portiert?

Urks?  Das ist doch nur eine Legende.....
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGiLRZjKJMaHhpyr4RCMvFAKDHXSCuK4PKAaefRFsarTcouUaCHgCeKnuL
DeeplW0oBb+7hSM7T9K6Gtc=
=Q2/O
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.