Function extract
Source pub fn extract(data: &[u8]) -> Result<String>
Expand description
Extracts all text from a PDF in one call.
This is the simplest way to extract text. For more control,
use Extractor.
§Example
let text = pdfvec::extract(&std::fs::read("document.pdf")?)?;
println!("{text}");
§Errors
Returns an error if the PDF is empty, invalid, or extraction fails.