| Crates.io | pdf_form |
| lib.rs | pdf_form |
| version | 0.4.0 |
| created_at | 2018-03-25 17:55:40.523168+00 |
| updated_at | 2020-09-28 18:37:19.569526+00 |
| description | A library for programatically filling out pdf forms |
| homepage | |
| repository | |
| max_upload_size | |
| id | 57448 |
| size | 35,242 |
A library to programatically identify and fill out PDF forms
extern crate pdf_form;
use pdf_form::{Form, FieldType};
// Load the pdf into a form from a path
let form = Form::load("path/to/pdf").unwrap();
// Get all types of the form fields (e.g. Text, Radio, etc) in a Vector
let field_types = form.get_all_types();
// Print the types
for type in field_types {
println!("{:?}", type);
};
extern crate pdf_form;
use pdf_form::{Form, FieldState};
// Load the pdf into a form from a path
let mut form = Form::load("path/to/pdf").unwrap();
form.set_text(0, String::from("filling the field"));
form.save("path/to/new/pdf");