aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 258b3fa..3f1e1c4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -43,6 +43,7 @@ pub struct Form {
}
/// The possible types of fillable form fields in a PDF
+#[derive(Debug)]
pub enum FieldType {
Button,
Radio,
@@ -198,6 +199,15 @@ impl Form {
}
}
+ /// Gets the types of all of the fields in the form
+ pub fn get_all_types(&self) -> Vec<FieldType> {
+ let mut res = Vec::with_capacity(self.len());
+ for i in 0..self.len() {
+ res.push(self.get_type(i))
+ };
+ res
+ }
+
/// Gets the state of field of the given index
///
/// # Panics