Skip to content

Commit

Permalink
Progressing #47
Browse files Browse the repository at this point in the history
  • Loading branch information
Alastair Carey committed Mar 21, 2023
1 parent 524019d commit bc1af3d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/ajrcarey/pdfium-render/issues/47>.
this breaking change, see <https://github.com/ajrcarey/pdfium-render/issues/47>.

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
Expand Down Expand Up @@ -357,7 +357,7 @@ at <https://github.com/ajrcarey/pdfium-render/issues>.
* 0.8.0: removes the ability to acquire an owned `PdfPages` instance from `PdfDocument::pages()`
as per <https://github.com/ajrcarey/pdfium-render/issues/47>; 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 <https://github.com/ajrcarey/pdfium-render/issues/77>.
of `FPDFText_GetBoundedText` as detailed in <https://github.com/ajrcarey/pdfium-render/issues/77>.
* 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()`
Expand Down
2 changes: 1 addition & 1 deletion src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Option<String>> {
pub fn field_values(&self, pages: &'a PdfPages<'a>) -> HashMap<String, Option<String>> {
let mut result = HashMap::new();

for page in pages.iter() {
Expand Down

0 comments on commit bc1af3d

Please sign in to comment.