| Crates.io | pdf_form_ids |
| lib.rs | pdf_form_ids |
| version | 0.6.0 |
| created_at | 2019-11-09 14:11:53.059392+00 |
| updated_at | 2019-11-16 19:07:27.428487+00 |
| description | A library for programatically filling out pdf forms |
| homepage | |
| repository | |
| max_upload_size | |
| id | 179713 |
| size | 26,765 |
A library to programatically identify and fill out PDF forms
This is a fork of pdf_form, adding support to query field IDs.
extern crate pdf_form_ids;
use pdf_form_ids::{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_ids;
use pdf_form_ids::{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");