use wasm_card::model::property_groups::address::Address; use wasm_card::model::property_groups::name::Name; use wasm_card::model::property_groups::telephone::Telephone; use wasm_card::model::vcard; fn main() { let mut data = vcard::VCardData::new(); data.add_name(Name { first_name: "John".to_owned(), last_name: "Doe".to_owned(), ..Default::default() }); data.add_telephone(Telephone { number: "+49 123 45678".to_owned(), cell: true, ..Default::default() }); data.add_address(Address { street: "Musterweg 1".to_owned(), code: "12345".to_owned(), locality: "Musterhausen".to_owned(), country: "Germany".to_owned(), ..Default::default() }); let pdf = data.generate_pdf().expect("Failed to generate PDF"); std::fs::write("output.pdf", &pdf).expect("Failed to write PDF file"); }