lopdf breaking changes
Updated December 4, 2026
On this page
Latest version 0.48.0, released December 4, 2026. Source repository
Packages on crates.io run on Rust. Rust end of life dates.
lopdf 0.48.0 breaking changes
- Behavior changed
Object.as_f64
as_f64 returns the stored f64 value rather than a rounded f32 value, so reals with more digits now read back differently. github.com - Signature changed
lopdf::Object::Real
Object::Real now stores an f64, so code matching Object::Real(x) and using x as f32 needs a cast or .into(). crates.io
lopdf 0.47.0 breaking changes
- Behavior changed
Streams that name more than 16 filters are now left undecoded. Code that expected those streams to be decoded must change. github.com - Behavior changed
When a plain save writes a cross-reference stream, the output PDF version is raised. Files saved this way declare a newer PDF version than before. github.com - Behavior changed
Stream decompression now has limits by default, so very large decoded streams may no longer load. Raise the limits if you need them. github.com - Default changed
The default Identity settings for V4 and V5 encryption filters were corrected. Encrypted output written with these defaults can differ from before. github.com
lopdf 0.46.0 breaking changes
- Removed
lopdf::Object::as_array
lopdf::Object::as_array was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_array_mut
lopdf::Object::as_array_mut was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_bool
lopdf::Object::as_bool was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_dict
lopdf::Object::as_dict was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_dict_mut
lopdf::Object::as_dict_mut was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_f32
lopdf::Object::as_f32 was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_i64
lopdf::Object::as_i64 was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_name
lopdf::Object::as_name was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_reference
lopdf::Object::as_reference was removed in lopdf 0.46.0 crates.io - Removed
lopdf::Object::as_stream
lopdf::Object::as_stream was removed in lopdf 0.46.0 crates.io
And 1 more in this version. Sign up to see every change
lopdf 0.45.0 breaking changes
- Behavior changed
When object streams are disabled, saving now writes a cross-reference stream. Code that inspects the saved file structure may see a different output format. github.com - Behavior changed
Saving an encrypted document now skips object streams. Code that depends on the saved file layout of encrypted documents may see different output. github.com - Default changed
When a file's Length entry is missing, the encryption key length is now taken from V. Code that assumed a different default key length may behave differently. github.com - Default changed
The date feature now uses a single backend by default, and a cheaper alternative is available. Code relying on the previous default date handling should check its behaviour. github.com - Signature changed
lopdf::Document::get_outlines
Was fn get_outlines(&self, mut node: Option<Object>, mut outlines: Option<Vec<Outline>>, named_destinations: &mut IndexMap<Vec<u8>, Destination>) -> Result<Option<Vec<Outline>>>; now fn get_outlines(&self, node: Option<Object>, outlines... crates.io - Signature changed
lopdf::Error::Xref
Was Xref(XrefError); now Xref(#[from] XrefError). crates.io - Signature changed
lopdf::filters::png::decode_frame
Was fn decode_frame(content: &[u8], bytes_per_pixel: usize, pixels_per_row: usize) -> Result<Vec<u8>>; now fn decode_frame(content: &[u8], bpp: usize, bytes_per_row: usize) -> Result<Vec<u8>>. crates.io - Signature changed
lopdf::ObjectStream::new
Was fn new(stream: &mut Stream) -> Result<ObjectStream>; now fn new(stream: &Stream) -> Result<ObjectStream>. crates.io - Signature changed
lopdf::ObjectStream::new_with_limit
Was fn new_with_limit(stream: &mut Stream, max_decompressed_size: Option<usize>) -> Result<ObjectStream>; now fn new_with_limit(stream: &Stream, max_decompressed_size: Option<usize>) -> Result<ObjectStream>. crates.io
lopdf 0.44.0 breaking changes
- Behavior changed
Saving an encrypted document incrementally now returns an error instead of writing the file. Code that relied on that save succeeding must handle the error. github.com - Configuration changed
The ttf-parser dependency is now optional and enabled through the font_embedding feature. Code that uses it must enable that feature. github.com - Signature changed
lopdf::Document::get_page_content
Document::get_page_content was refactored to return Vec<u8>. Code that matched its previous return type must be updated to use the new one. crates.io - Signature changed
lopdf::xref::decode_xref_stream
Was fn decode_xref_stream(mut stream: Stream) -> Result<(Xref, Dictionary)>; now fn decode_xref_stream(stream: Stream) -> Result<(Xref, Dictionary)>. crates.io
lopdf 0.43.0 breaking changes
- Signature changed
The release updates the crypto APIs, which may change how existing crypto-related calls must be written. The notes do not name the affected symbols, so check the crate's docs for the exact changes. github.com
Older versions
7 older versions, each with its first changes. Sign up to see every change
Show 7 older versions
lopdf 0.42.0 breaking changes
- Behavior changed
When content streams are concatenated, a newline is now inserted between them, which changes the resulting bytes. Code that relies on the exact previous output may need to adjust. github.com - Behavior changed
Parsing now rejects input with deeply nested arrays or dictionaries beyond a fixed limit, which earlier versions accepted. Code that parses such files may now get an error. github.com
lopdf 0.41.0 breaking changes
- Signature changed
lopdf::Dictionary::get_font_encoding
Was fn get_font_encoding(&'_ self, doc: &Document) -> Result<Encoding<'_>>; now fn get_font_encoding<'a>(&'a self, doc: &'a Document) -> Result<Encoding<'a>>. crates.io - Signature changed
lopdf::encode_utf16_be
Was fn encode_utf16_be(text: &str) -> Vec<u8>; now fn encode_utf16_be(text: &str, out: &mut Vec<u8>). crates.io
lopdf 0.37.0 breaking changes
- Signature changed
lopdf::Dictionary::get_font_encoding
Was fn get_font_encoding(&self, doc: &Document) -> Result<Encoding>; now fn get_font_encoding(&'_ self, doc: &Document) -> Result<Encoding<'_>>. crates.io - Signature changed
lopdf::Dictionary::iter
Was fn iter(&self) -> indexmap::map::Iter<Vec<u8>, Object>; now fn iter(&'_ self) -> indexmap::map::Iter<'_, Vec<u8>, Object>. crates.io
And 5 more in this version.
lopdf 0.36.0 breaking changes
- Removed
lopdf::encryption::get_encryption_key
lopdf::encryption::get_encryption_key was removed in lopdf 0.36.0 crates.io - Signature changed
lopdf::Document::decrypt
Was fn decrypt<P: AsRef<[u8]>>(&mut self, password: P) -> Result<()>; now fn decrypt(&mut self, password: &str) -> Result<()>. crates.io
And 2 more in this version.
lopdf 0.35.0 breaking changes
- Removed
lopdf::Dictionary::type_name
lopdf::Dictionary::type_name was removed in lopdf 0.35.0 crates.io - Removed
lopdf::Error::BracketLimit
lopdf::Error::BracketLimit was removed in lopdf 0.35.0 crates.io
And 31 more in this version.
lopdf 0.34.0 breaking changes
- Signature changed
lopdf::Dictionary
Was struct Dictionary(LinkedHashMap<Vec<u8>, Object>); now struct Dictionary(IndexMap<Vec<u8>, Object>). crates.io - Signature changed
lopdf::Dictionary::as_hashmap
Was fn as_hashmap(&self) -> &LinkedHashMap<Vec<u8>, Object>; now fn as_hashmap(&self) -> &IndexMap<Vec<u8>, Object>. crates.io
And 10 more in this version.
lopdf 0.33.0 breaking changes
- Signature changed
lopdf::Document::get_dict_in_dict
Was fn get_dict_in_dict(&self, node: &Dictionary, key: &[u8]) -> Result<&Dictionary>; now fn get_dict_in_dict<'a>(&'a self, node: &'a Dictionary, key: &[u8]) -> Result<&'a Dictionary>. crates.io - Signature changed
lopdf::Document::get_named_destinations
Was fn get_named_destinations(&self, tree: &Dictionary, named_destinations: &mut BTreeMap<Vec<u8>, Destination>) -> Result<()>; now fn get_named_destinations(&self, tree: &Dictionary, named_destinations: &mut IndexMap<Vec<u8>... crates.io
And 2 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.