You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Indexed colour space not completely conforming #75
Excerpt from PDF 1.7 (ISO 32000:2008) specification from Adobe:
8.6.6.3 Indexed Colour Spaces
An Indexed colour space shall be defined by a four-element array:
[/Indexed basehivallookup]
...(omitted)...
The base parameter shall be an array or name that identifies...
The current API in ColorSpace<'a> only allows the base parameter to be a name (source) and does not allow an array.
As a result, I cannot specify CalRGB, CalGray, IccBased or similar colour spaces as the base colour space, all of whom require an array to describe them.
Is it possible to extend the API to handle the array case, or is there a workaround?
Unfortunately pdf-writer currently does not always expose all options. The current API design (which needs to statically decide between parameter and writer return type) is not perfect and makes it at times annoying to expose such things.
As for a workaround: Most writers allow you to drop down to the untyped API and write the underlying primitives directly. You could give that a shot.
Activity
laurmaedje commentedon Jan 21, 2026
Unfortunately pdf-writer currently does not always expose all options. The current API design (which needs to statically decide between parameter and writer return type) is not perfect and makes it at times annoying to expose such things.
As for a workaround: Most writers allow you to drop down to the untyped API and write the underlying primitives directly. You could give that a shot.