Skip to content

Commit 49ef7d2

Browse files
committed
Bump lopdf to 0.36.0
1 parent 4829360 commit 49ef7d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ debug = true
1717
adobe-cmap-parser = "0.4.1"
1818
encoding_rs = "0.8.34"
1919
euclid = "0.20.5"
20-
lopdf = {version = "0.34", default-features = false, features = ["nom_parser"]}
20+
lopdf = {version = "0.36.0", default-features = false}
2121
postscript = "0.14"
2222
type1-encoding-parser = "0.1.0"
2323
unicode-normalization = "0.1.19"

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ struct TextState<'a>
12501250

12511251
// XXX: We'd ideally implement this without having to copy the uncompressed data
12521252
fn get_contents(contents: &Stream) -> Vec<u8> {
1253-
if contents.filter().is_ok() {
1253+
if contents.filters().is_ok() {
12541254
contents.decompressed_content().unwrap_or_else(|_|contents.content.clone())
12551255
} else {
12561256
contents.content.clone()
@@ -2307,7 +2307,7 @@ pub fn extract_text_by_pages_encrypted<P: std::convert::AsRef<std::path::Path>,
23072307
let mut v = Vec::new();
23082308
{
23092309
let mut doc = Document::load(path)?;
2310-
doc.decrypt(password)?;
2310+
doc.decrypt_raw(password)?;
23112311
let mut page_num = 1;
23122312
while let Ok(content) = extract_text_by_page(&mut doc, page_num) {
23132313
v.push(content);
@@ -2335,7 +2335,7 @@ pub fn extract_text_from_mem_by_pages_encrypted<PW: AsRef<[u8]>>(buffer: &[u8],
23352335
let mut v = Vec::new();
23362336
{
23372337
let mut doc = Document::load_mem(buffer)?;
2338-
doc.decrypt(password)?;
2338+
doc.decrypt_raw(password)?;
23392339
let mut page_num = 1;
23402340
while let Ok(content) = extract_text_by_page(&doc, page_num) {
23412341
v.push(content);
@@ -2363,7 +2363,7 @@ pub fn output_doc_encrypted<PW: AsRef<[u8]>>(
23632363
output: &mut dyn OutputDev,
23642364
password: PW,
23652365
) -> Result<(), OutputError> {
2366-
doc.decrypt(password)?;
2366+
doc.decrypt_raw(password)?;
23672367
output_doc(doc, output)
23682368
}
23692369

0 commit comments

Comments
 (0)