diff --git a/README.md b/README.md index b99ce35..482f379 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Version 0.8.0 reworks the `PdfDocument::pages()` function. Previously, this func returned an owned `PdfPages` instance; it now returns an immutable `&PdfPages` reference instead. A new `PdfDocument::pages_mut()` function returns a mutable `&mut PdfPages` reference. It is no longer possible to retrieve an owned `PdfPages` instance. For the motivation behind -this change, see . +this breaking change, see . Version 0.7.34 adds support for reading values from form fields wrapped inside the newly added `PdfPageWidgetAnnotation` and `PdfPageXfaWidgetAnnotation` annotation objects. Also added are @@ -357,7 +357,7 @@ at . * 0.8.0: removes the ability to acquire an owned `PdfPages` instance from `PdfDocument::pages()` as per ; adds new `PdfDocument::pages_mut()` function to match reworked `PdfDocument::pages()` function; fixes a bug in the WASM implementation - of `FPDFText_GetBoundedText` as detailed at . + of `FPDFText_GetBoundedText` as detailed in . * 0.7.34: replaces functions in `PdfPageLinks` using linear traversal with binary search traversal; adds new `PdfFormField` enum; renames `PdfPageObjectFormFragment` to `PdfPageXObjectFormObject` to disambiguate it from `PdfForm` and `PdfFormField`; adds `PdfPageAnnotationCommon::as_form_field()` diff --git a/src/document.rs b/src/document.rs index 6c48cc1..2c81a62 100644 --- a/src/document.rs +++ b/src/document.rs @@ -256,7 +256,7 @@ impl<'a> PdfDocument<'a> { /// Returns an immutable collection of all the [PdfPages] in this [PdfDocument]. #[inline] - pub fn pages(&self) -> &PdfPages { + pub fn pages(&self) -> &PdfPages<'a> { &self.pages } diff --git a/src/form.rs b/src/form.rs index bf58ba4..61cd629 100644 --- a/src/form.rs +++ b/src/form.rs @@ -195,7 +195,7 @@ impl<'a> PdfForm<'a> { /// the given [PdfPages] collection, returning a map of (field name, field value) pairs. /// /// This function assumes that all form fields in the document have unique field names. - pub fn field_values(&self, pages: &PdfPages) -> HashMap> { + pub fn field_values(&self, pages: &'a PdfPages<'a>) -> HashMap> { let mut result = HashMap::new(); for page in pages.iter() {