diff --git a/Cargo.toml b/Cargo.toml index 47a50fd..b1dc3b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lopdf" -version = "0.15.2" +version = "0.15.3" authors = ["Junfeng Liu "] homepage = "https://github.com/J-F-Liu/lopdf" documentation = "https://docs.rs/crate/lopdf/" @@ -10,7 +10,7 @@ readme = "README.md" description = "A Rust library for PDF document manipulation." [dependencies] -pom = "1.0.1" +pom = "1.1.0" chrono = "0.3.0" flate2 = "0.2.14" linked-hash-map = "0.3.0" diff --git a/src/object.rs b/src/object.rs index 42b05a0..5078107 100644 --- a/src/object.rs +++ b/src/object.rs @@ -403,7 +403,7 @@ impl Stream { if let Some(filter) = self.filter() { match filter.as_str() { "FlateDecode" => { - if self.dict.get("Subtype").is_some() { + if self.dict.get("Subtype").and_then(|v| v.as_name_str()) == Some("Image") { return None; } let mut data = Vec::new();