Skip to content

Commit

Permalink
Don't panic on DeviceN colorspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmuizel committed Dec 28, 2024
1 parent 5a7839c commit 4789858
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["pdf2text", "text", "pdf", "pdf2txt"]
license = "MIT"
name = "pdf-extract"
repository = "https://github.com/jrmuizel/pdf-extract"
version = "0.7.12"
version = "0.8.0"
include = ["src/**/*", "README.md"]

[profile.release]
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,7 @@ pub enum ColorSpace {
DeviceGray,
DeviceRGB,
DeviceCMYK,
DeviceN,
Pattern,
CalRGB(CalRGB),
CalGray(CalGray),
Expand Down Expand Up @@ -1486,6 +1487,7 @@ fn make_colorspace<'a>(doc: &'a Document, name: &[u8], resources: &'a Dictionary
"DeviceGray" => ColorSpace::DeviceGray,
"DeviceRGB" => ColorSpace::DeviceRGB,
"DeviceCMYK" => ColorSpace::DeviceCMYK,
"DeviceN" => ColorSpace::DeviceN,
_ => {
panic!("color_space {:?} {:?} {:?}", name, cs_name, cs)
}
Expand Down

0 comments on commit 4789858

Please sign in to comment.