Skip to content

Commit c2bc041

Browse files
format and sync with upstream
1 parent b763470 commit c2bc041

File tree

8 files changed

+11703
-7007
lines changed

8 files changed

+11703
-7007
lines changed

Cargo.toml

+1-1
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.32", default-features = false, features = ["nom_parser"]}
20+
lopdf = {version = "0.33", default-features = false, features = ["nom_parser"]}
2121
postscript = "0.14"
2222
type1-encoding-parser = "0.1.0"
2323
unicode-normalization = "0.1.19"

examples/extract.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
extern crate pdf_extract;
21
extern crate lopdf;
2+
extern crate pdf_extract;
33

4+
use lopdf::*;
5+
use pdf_extract::*;
46
use std::env;
5-
use std::path::PathBuf;
6-
use std::path;
7-
use std::io::BufWriter;
87
use std::fs::File;
9-
use pdf_extract::*;
10-
use lopdf::*;
8+
use std::io::BufWriter;
9+
use std::path;
10+
use std::path::PathBuf;
1111

1212
fn main() {
1313
//let output_kind = "html";
@@ -21,13 +21,16 @@ fn main() {
2121
let mut output_file = PathBuf::new();
2222
output_file.push(filename);
2323
output_file.set_extension(&output_kind);
24-
let mut output_file = BufWriter::new(File::create(output_file).expect("could not create output"));
24+
let mut output_file =
25+
BufWriter::new(File::create(output_file).expect("could not create output"));
2526
let doc = Document::load(path).unwrap();
2627

2728
print_metadata(&doc);
2829

2930
let mut output: Box<dyn OutputDev> = match output_kind.as_ref() {
30-
"txt" => Box::new(PlainTextOutput::new(&mut output_file as &mut dyn std::io::Write)),
31+
"txt" => Box::new(PlainTextOutput::new(
32+
&mut output_file as &mut dyn std::io::Write,
33+
)),
3134
"html" => Box::new(HTMLOutput::new(&mut output_file)),
3235
"svg" => Box::new(SVGOutput::new(&mut output_file)),
3336
_ => panic!(),

src/core_fonts.rs

+4,266-17
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)