PDFLib set_graphics_option how to pass list of colors in fillcolor option

211 Views Asked by At

How to pass multiple PANTONE Colors list to PDF library set_graphics_option function?

optList = "fillcolor={spotname {PANTONE 281 U} 1}";
p.set_graphics_option(optlist);
2

There are 2 best solutions below

2
On

How to pass multiple PANTONE Color set to PDF library set_graphics_option function?

Maybe I don't get your question yet, but you can only have one color set at a time. When you want to fill some content with a different color, you have to set the (fill|stroke)color accordingly.

When you want to the stoke and fill color in a single set, you can combine this:

optList = "fillcolor={spotname {PANTONE 281 U} 1} strokecolor={spotname {PANTONE 128 U} 1}";
p.set_graphics_option(optlist);
0
On

Have you tried raising this with PDFLib support as a bug? I don't know if you can trace the Pantone colour property through PDFLib to see whether the problem is in the SVG loading not picking it up, or whether it's being dropped when assembled into the document maybe, or not being written into the PDF - that might help you find out where the problem is, and if you can fix it yourself. But otherwise this just reads like a bug report and I'm not sure what we can do to help you.