-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
option to use named SpotColor #181
Comments
To be fair, I haven't worked with spot colors. The library just converts them into a Stream of Lines 22 to 52 in fbc7d69
here, when you call Line 133 in fbc7d69
So idk, maybe spot colors need different handling. I haven't read the PDF reference on this topic. |
You could create an API like this: PdfDocument::create_named_spotcolor(&mut document, ...) -> SpotColorRef { }
enum PdfColor {
...
NamedSpot(SpotColorRef),
}
impl From<SpotColorRef> for lopdf::Operation {
fn from(s: SpotColorRef) -> {
lopdf::Operation::Reference(PDF_FILL_COLOR, Object::Reference(s.inner.clone()))
}
} |
Thanks for the pointers! I will have a look at it and see if I can get it working. Seems like a good way to go about it. |
Any updates on this? |
Sorry, priority work came in, so I had to put my attempt on the backburner. I solved my issue here and now by opening the generated pdf in illustrator and manually set it to spot color. I hope to get some time in coming months to give it a go. |
I have an application where I need to use a named spotcolor with the name "Cut". As the printer requires that to cut the right lines.
It seems like this library makes spotcolours behave like CMYK colours and does not give an option to name it?
Would it be something that could be added?
I would consider looking into implementing it myself, but would need some pointers on how the library currently exports the spotcolor to pdf. Unsure if it already handles the custom colorspace for spotcolors and is just missing the naming, or it sees spotcolors as CMYK like the CMYK color and would need to figure out how to implement spot colours related to PDF specification.
The text was updated successfully, but these errors were encountered: