From 57831804ee8e7fcaeb03975ab9b5a6daa8ba04e8 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 22 Jun 2021 13:50:37 +0900
Subject: docassembly (new)

---
 .../doc/latex/docassembly/examples/open-doc.tex    | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 texmf-dist/doc/latex/docassembly/examples/open-doc.tex

(limited to 'texmf-dist/doc/latex/docassembly/examples/open-doc.tex')

diff --git a/texmf-dist/doc/latex/docassembly/examples/open-doc.tex b/texmf-dist/doc/latex/docassembly/examples/open-doc.tex
new file mode 100644
index 00000000..4b861b79
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/open-doc.tex
@@ -0,0 +1,34 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the app.openDoc() to see all the possible parameters.
+\begin{docassembly}
+% Open supportDoc.pdf, but hide it
+var doc=\appopenDoc({
+  oDoc:  this,
+  cPath: "resources/supportDoc.pdf",
+  bHidden: true
+});
+console.clear(); console.show();
+console.println("Opening " + doc.documentFileName);
+% Get the field object, for the text field that has title of "Name"
+console.println("Getting the field value of \"Name\"");
+var f=doc.getField("Name");
+% Show the value of that text field and display it in the console
+console.println("The value of \"Name\" is "+f.value);
+% Close the hidden doc
+console.println("Closing " + doc.documentFileName);
+doc.closeDoc();
+% Save the current document
+console.println("Saving the current document " + this.documentFileName);
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} 
\ No newline at end of file
-- 
cgit v1.2.3

