[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: small test with spot color (477549f)

Ulrike Fischer fischer at troubleshooting-tex.de
Sat May 18 01:16:27 CEST 2019


Repository : https://github.com/latex3/pdfresources
On branch  : testlinkstuff
Link       : https://github.com/latex3/pdfresources/commit/477549f2b2eb287b02673ff111309fad709352d1

>---------------------------------------------------------------

commit 477549f2b2eb287b02673ff111309fad709352d1
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat May 18 01:16:27 2019 +0200

    small test with spot color


>---------------------------------------------------------------

477549f2b2eb287b02673ff111309fad709352d1
 test-pageresource.tex |   24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/test-pageresource.tex b/test-pageresource.tex
index 278b103..93bd913 100644
--- a/test-pageresource.tex
+++ b/test-pageresource.tex
@@ -1,17 +1,33 @@
+% !Mode:: "TeX:UTF-8:Main"
 \documentclass[12pt,oneside]{article}
 \usepackage[patches]{pdfresources}
-\usepackage{tikz}
+\usepackage{tikz,xcolor,l3str-convert}
 \usepackage{transparent}
 \ExplSyntaxOn
 \driver_pdf_compresslevel:n {0}
 \driver_pdf_compress_objects:n {0}
 %test local resource:
-\driver_pdf_pageresources_gput:nnnn{1}{ColorSpace}{abc}{/Deviceblub}
-%\driver_pdf_catalog_gput:nn {Lang}
+%\driver_pdf_pageresources_gput:nnnn{1}{ColorSpace}{abc}{/Deviceblub}
 
+\driver_pdf_object_new:nn {spotcolor_obj}{array}
+\cs_generate_variant:Nn \driver_pdf_object_write:nn {nx}
+\str_set_convert:Nnnn \l_tmpa_str {BarTone~555~GN}{utf8}{utf8/name}
+\str_show:N\l_tmpa_str
+\driver_pdf_object_write:nx{spotcolor_obj}
+{
+  /Separation~/\l_tmpa_str~ /DeviceCMYK
+      << /C0~[0~0~0~0] /FunctionType~2 /C1 [0.8~0.2~0.5~0.3] /Domain [0~1] /N~1 >>
+}
+\cs_generate_variant:Nn \driver_pdf_pageresources_gput:nnnn {nnnx}
+\driver_pdf_pageresources_gput:nnnx{1}{ColorSpace}{foo}{\driver_pdf_object_ref:n{spotcolor_obj}}
 \ExplSyntaxOff
-
 \begin{document}
+\color{red} 
+Hello
+\pdfliteral{/foo cs /foo CS 1 sc 1 SC}
+world
+\end{document}
+
 abc
 \newpage
 blblb





More information about the latex3-commits mailing list