The extract_markdown stub was calling extract_text instead of extract_text_fn, causing a compilation error. This fixes the function name to match the exported function from extract_text.rs. This completes the extract_text PyO3 entry point implementation, which was already present in extract_text.rs and lib.rs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
12 lines
338 B
Rust
12 lines
338 B
Rust
use pdftract_core::{extract_pdf, ExtractionOptions};
|
|
|
|
fn main() {
|
|
let result = extract_pdf(
|
|
"tests/sdk-conformance/fixtures/mixed/mixed.pdf",
|
|
&ExtractionOptions::default()
|
|
);
|
|
match result {
|
|
Ok(doc) => println!("Success! Pages: {}", doc.pages.len()),
|
|
Err(e) => println!("Error: {}", e),
|
|
}
|
|
}
|