From 86860b88a6f7478c2296072ae5c6179b53a80dc8 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 25 Apr 2023 02:50:58 +0200 Subject: Add README Include a brief description and an example of code and XML output. --- README.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..595b293 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +xfdf +==== + +A library to generate XFDF XML to fill in interactive PDF form fields. + + +## Example +This code: + +``` common-lisp +;;; xfdf-example.lisp + +(ql:quickload "xfdf") + +(format t "~A" + (with-output-to-string (xfdf-stream) + (xfdf:write-xfdf + xfdf-stream + '(("topmostSubform[0]" + . (("Page1[0]" + . (("c1_01[1]" . "2") + ("f1_02[0]" . "Homer J.") + ("f1_03[0]" . "Simpson") + ("f1_05[0]" . "Marjorie J.") + ("f1_06[0]" . "Simpson") + ("Address[0]" + . (("f1_08[0]" . "742 Evergreen Terrace") + ("f1_10[0]" . "Springfield"))))) + ("Page2[0]" + . (("f2_33[0]" . "Nuclear safety inspector"))))))))) +``` + +produces the following XML: + +``` xml + + + + + + + 2 + + + Homer J. + + + Simpson + + + Marjorie J. + + + Simpson + + + + 742 Evergreen Terrace + + + Springfield + + + + + + Nuclear safety inspector + + + + + +``` + + +## Resources + +[XFDF reference] -- cgit v1.2.3