summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-06-22 13:50:37 +0900
committerNorbert Preining <norbert@preining.info>2021-06-22 13:50:37 +0900
commit57831804ee8e7fcaeb03975ab9b5a6daa8ba04e8 (patch)
treed684b9c76213272bb51d18c30b82de8b0c61ad02
parentfb2f381158906763069d7c68395d326226443856 (diff)
docassembly (new)
-rw-r--r--ctan2tds-config.pl1
-rw-r--r--texmf-dist/doc/latex/docassembly/README.md35
-rw-r--r--texmf-dist/doc/latex/docassembly/docassembly.pdfbin0 -> 357824 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/attach-files.tex31
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/certifyinvisible.pdfbin0 -> 135837 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/certifyinvisible.tex151
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/create-templates.tex66
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/doc-saveas.tex27
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/extract-pages.tex24
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon-btn.pdfbin0 -> 80868 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon.pdfbin0 -> 85289 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDonIcon.pdfbin0 -> 78327 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/graphics/AeB_Logo.pdfbin0 -> 34683 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/graphics/girl.pdfbin0 -> 415673 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/graphics/man1.pdfbin0 -> 416225 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/graphics/scot.pdfbin0 -> 409204 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/import-icons.tex56
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/import-sound.tex24
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/insert-pages.tex20
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/mail-doc.tex31
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/open-doc.tex34
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/resources/myStory.pdfbin0 -> 34655 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/resources/supportDoc.pdfbin0 -> 7358 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/sign.pdfbin0 -> 171458 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/sign.tex206
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/sounds/trek.wavbin0 -> 89864 bytes
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/watermark-file.tex25
-rw-r--r--texmf-dist/doc/latex/docassembly/examples/watermark-text.tex26
-rw-r--r--texmf-dist/source/latex/docassembly/docassembly.dtx538
-rw-r--r--texmf-dist/source/latex/docassembly/docassembly.ins59
-rw-r--r--texmf-dist/tex/latex/docassembly/docassembly.sty121
-rw-r--r--tlpkg/tlpsrc/docassembly.tlpsrc0
32 files changed, 1475 insertions, 0 deletions
diff --git a/ctan2tds-config.pl b/ctan2tds-config.pl
index 16f11ba2..3dde9204 100644
--- a/ctan2tds-config.pl
+++ b/ctan2tds-config.pl
@@ -41,6 +41,7 @@ $special{'popupmenu'} = '&MAKEdps';
$special{'ltx4yt'} = '&MAKEdps';
$special{'rmannot'} = '&MAKEdps';
$special{'eq-fetchbbl'} = '&MAKEdps';
+$special{'docassembly'} = '&MAKEdps';
sub MAKEdps {
diff --git a/texmf-dist/doc/latex/docassembly/README.md b/texmf-dist/doc/latex/docassembly/README.md
new file mode 100644
index 00000000..e5897f2e
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/README.md
@@ -0,0 +1,35 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% docassembly.sty package, %%
+%% Copyright (C) 2021 D. P. Story %%
+%% dpstory@acrotex.net %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Project Public License %%
+%% Distributed from CTAN archives in directory %%
+%% macros/latex/base/lppl.txt; either version 1.2 of %%
+%% the License, or (at your option) any later version. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Dated: 2021-06-19
+
+Targeted audience: LaTeX authors who love their pdflatex, lualtex, xelatex,
+or dvips -> ps2pdf workflow, who also own Acrobat Pro application.
+
+The docassembly package defines the docassembly environment in which
+JavaScript code can be written to execute once and only once the newly
+created PDF in the Acrobat application. The package also defines a series of
+helper commands to execute security restricted JavaScript methods. Using
+these security restricted commands, you can place watermarks on the document,
+attached files, import icons and sounds, insert pages, extract pages, send
+email, and so on. All these methods I have used for years through the aeb_pro
+package, which generally restricted to a dvips -> distiller workflow. Now,
+these methods are available to all those who own Acrobat, no matter what PDF
+creator used.
+
+What's New (2021-06-19) Moved some documentation from this package to
+ the acrotex-js package. New require acrotex-js dated 2021/06/19 or later.
+
+Now, I simply must get back to my retirement.
+
+D. P. Story
+dpstory@acrotex.net
+
diff --git a/texmf-dist/doc/latex/docassembly/docassembly.pdf b/texmf-dist/doc/latex/docassembly/docassembly.pdf
new file mode 100644
index 00000000..c782c598
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/docassembly.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/attach-files.tex b/texmf-dist/doc/latex/docassembly/examples/attach-files.tex
new file mode 100644
index 00000000..6bec57ab
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/attach-files.tex
@@ -0,0 +1,31 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseAttachments}
+
+% Look in the Adobe Acrobat JavaScript manual under the doc.importDataObject to see all the possible parameters.
+\begin{docassembly}
+% Or use \attachFile instead of \importDataObject
+var retn = \importDataObject({
+ cName: "job",
+ cDIPath: "\jobname.tex"
+});
+% The next line creates a meaningful description of the attachment
+if (retn) this.getDataObject("job").description="Source file for this PDF";
+% You can have more than one file attachments
+var retn = \attachFile({
+ cName: "AdobeDon",
+ cDIPath: "graphics/AdobeDon.pdf"
+});
+% The next line creates a meaningful description of the attachment
+if (retn) this.getDataObject("AdobeDon").description="The one and only AdobeDon";
+% ...
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} \ No newline at end of file
diff --git a/texmf-dist/doc/latex/docassembly/examples/certifyinvisible.pdf b/texmf-dist/doc/latex/docassembly/examples/certifyinvisible.pdf
new file mode 100644
index 00000000..d00c7704
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/certifyinvisible.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/certifyinvisible.tex b/texmf-dist/doc/latex/docassembly/examples/certifyinvisible.tex
new file mode 100644
index 00000000..b4205b71
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/certifyinvisible.tex
@@ -0,0 +1,151 @@
+\documentclass[12pt]{article}
+\usepackage{eforms}
+\usepackage{docassembly}
+\usepackage{fancyvrb}
+
+\hypersetup{pdfpagemode=UseNone}
+
+\newcommand{\cs}[1]{\texttt{\char`\\#1}}
+
+\pagestyle{empty}
+\parskip\medskipamount
+\parindent0pt
+
+% Do not compile until you have a digital ID and password
+% Actually, you can compile, but do not bring the PDF into Acrobat until you have a digital ID and password.
+% You can view the PDF in other PDF viewers such as SumatraPDF.
+\begin{docassembly}
+\sigInfo{
+ cert: "<name>.pfx",
+ password: "<password>",
+ oInfo: {
+ location: "AcroTeX Central, FL",
+ reason: "I am certifying this document",
+ mdp: "defaultAndComments",
+ contactInfo: "dpspeaker@talking@edu"
+ }
+};
+\certifyInvisibleSign
+\end{docassembly}
+
+\begin{document}
+
+
+%\maketitle
+
+\hfill\smash{\raisebox{-\baselineskip}{March 23, 2009}}
+
+\begin{tabular}{@{}ll}
+To: &Honorable Barrister Maxwell Frimpong\\
+From: &D. P. Speaker\\
+Subject: &On Business Proposal\\
+\end{tabular}
+
+\vspace{2\baselineskip}
+
+Dear Mr.\ Frimpong;
+
+Thank you for thinking of me concerning an ``important business proposal'' in
+your recent and brief email to me on March 23, 2009. Recovering \$12,000,000
+(twelve million Us dollars) in claims sounds intriguing and exciting to me.
+Such a large amount of money would certainly come in handy in these tough
+times. Yet, regrettably, I must decline your kind offer; though I am in
+retirement, I am, none-the-less, quite busy lately sorting my button
+collection and don't really have the time to pick up all this easy money.
+
+Thank you again, Barrister Frimpong, for your offer. Please keep me
+in mind should future opportunities arise.
+
+
+\vspace{2\baselineskip}
+
+Best regards,\\
+\sigField{sigOfDPS}{2.5in}{4\baselineskip}\\[3pt]
+Dr.\ D. P. Speaker\\
+Department of Rhetoric\\
+Talking University\\
+Talkville, FL 12345\\
+\texttt{dpspeaker@talking.edu}
+
+\newpage
+
+\section{Creating and Signing a Certified Invisible Signature}
+
+The \textsf{docassembly} package can create a \emph{certified invisible
+signature}. You create an certified invisible signature either through the
+user-interface of \textsf{Acrobat} or programmatically using JavaScript. With
+JavaScript (and \textsf{docassembly}, a trusted version of the
+\texttt{\textsl{Doc}.certifyInvisibleSign()} method is used to certify the
+document. The certification can be seen by opening the Signature panel
+(part of the left-hand panel system of the user-interface).
+
+Also included is an approval signature, as usual, at the end of the letter. Open
+this PDF and sign using your own digital ID. Signing should not invalidate
+the certification.
+
+The certify invisible sign is done within the \texttt{docassembly}
+environment, the script follows:
+\begin{Verbatim}[xleftmargin=20pt,fontsize=\small]
+\begin{docassembly}
+\sigInfo{
+ cert: "<name>.pfx", password: "<password>",
+ oInfo: {
+ location: "AcroTeX Central, FL",
+ reason: "I am certifying this document",
+ mdp: "defaultAndComments",
+ contactInfo: "dpspeaker@talking.edu"
+ }
+};
+\certifyInvisibleSign
+\end{docassembly}
+\end{Verbatim}
+The setup is similar to certify sign, but without the key
+\texttt{cSigFieldName}, used to specify a particular field to be signed.
+An invisible signature field \emph{is created and signed} using the method
+\texttt{\textsl{Doc}.certifyInvisibleSign()}.
+
+
+The \cs{sigInfo} contains the usual property list, excluding
+\texttt{cSigFieldName}. The command \cs{certifyInvisibleSign}
+uses the information in this object and calls the trusted version
+of \texttt{\textsl{Doc}.certifyInvisibleSign()}, which is defined in
+\texttt{aeb\_pro.js}.
+
+Additional information on signatures is found at the
+\textbf{Acrobat Developer Center}.\footnote{\url{http://www.adobe.com/go/acrobat_developer}}
+Refer to the \emph{JavaScript for Acrobat API Reference}, also found at the \textbf{Acrobat Developer Center},
+for details on these methods and their parameters. Adobe is
+notorious for moving its reference documents and renaming them, year after
+year. Good luck searching the Adobe web site for the references you need.
+
+\section{Compiling this file}
+
+In the preamble of this document, the \texttt{docassembly} environment is found:
+\begin{Verbatim}[xleftmargin=20pt,fontsize=\small]
+\begin{docassembly}
+\sigInfo{
+ cert: "<name>.pfx", password: "<password>",
+ oInfo: {
+ location: "AcroTeX Central, FL",
+ reason: "I am certifying this document",
+ mdp: "defaultAndComments",
+ contactInfo: "dpspeaker@talking.edu"
+ }
+};
+\certifyInvisibleSign
+\end{docassembly}
+\end{Verbatim}
+To compile this document yourself, you need to create a digital ID using
+\textsf{Acrobat}. Replace \texttt{<name>} with the file name of your digital
+ID. and of course replace \texttt{<password>} with the password you selected
+when you created your digital ID. Modify the \texttt{oInfo} property as
+designed.
+
+
+Now, back to my retirement.
+
+\end{document}
+
+References: Try
+Digital Signatures Workflow Guide
+http://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/index.html
diff --git a/texmf-dist/doc/latex/docassembly/examples/create-templates.tex b/texmf-dist/doc/latex/docassembly/examples/create-templates.tex
new file mode 100644
index 00000000..62694179
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/create-templates.tex
@@ -0,0 +1,66 @@
+\documentclass{article}
+\usepackage{xcolor}
+\usepackage{docassembly}
+\usepackage{eforms}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone,colorlinks}
+
+\begin{defineJS}{\ADActn}
+if (typeof tmplObj != "object")
+ tmplObj=this.getTemplate("AdobeDon");
+tmplObj.spawn({
+ nPage: 0,
+ bOverlay:false,
+ oXObject: tmplObj
+});
+\end{defineJS}
+\begin{defineJS}{\contActn}
+if (typeof tmplObjSpawn != "object") {
+ var tmplObjSpawn=this.getTemplate("myStory");
+ tmplObjSpawn.spawn({
+ nPage: this.pageNum+1,
+ bOverlay:false,
+ oXObject: tmplObjSpawn
+ });
+ this.pageNum++;
+}
+\end{defineJS}
+
+% Look in the Adobe Acrobat JavaScript manual under the Doc.createTemplate to see all the possible parameters.
+\begin{docassembly}
+\insertPages({
+ nPage: -1,
+ cPath: "graphics/AdobeDon-btn.pdf"
+});
+var tmplObj=\createTemplate({cName: "AdobeDon", nPage: 0});
+tmplObj.hidden=true;
+\insertPages({
+ nPage: -1,
+ cPath: "resources/myStory.pdf"
+});
+var tmplObj1=\createTemplate({cName: "myStory", nPage: 0});
+tmplObj1.hidden=true;
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\noindent
+\pushButton[\CA{View author}\AAmouseup{\ADActn}]{vTmpl}{}{11bp}\medskip
+
+\noindent
+\lipsum[1-4]\medskip
+
+\noindent
+Write a short history of your life. Press the \textsf{Continue} link if you need more space for your story, and then continue on the
+next page.\medskip
+
+\noindent
+\textField[\Ff\FfMultiline]{myStory}{\linewidth}{3\baselineskip}\\[6bp]\null
+\hfill\setLink[\A{\JS{\contActn}}\linktxtcolor{red}]{Continue on next page as needed}
+
+\newpage
+\noindent\lipsum[5-10]
+
+\end{document}
diff --git a/texmf-dist/doc/latex/docassembly/examples/doc-saveas.tex b/texmf-dist/doc/latex/docassembly/examples/doc-saveas.tex
new file mode 100644
index 00000000..38df5985
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/doc-saveas.tex
@@ -0,0 +1,27 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the doc.saveAs() to see all the possible parameters.
+\begin{docassembly}
+% save a copy of this PDF for the archives
+var retn=\docSaveAs({
+ cPath: "\jobname-copy.pdf",
+ bCopy: true
+});
+% This method can also be used to make conversions, for example, you can save a PDF as a PNG
+% Here, we make a PNG image of each page in this document.
+var retn=\docSaveAs({
+ cConvID: "com.adobe.acrobat.png",
+ cPath: "\jobname.png"
+});
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} \ No newline at end of file
diff --git a/texmf-dist/doc/latex/docassembly/examples/extract-pages.tex b/texmf-dist/doc/latex/docassembly/examples/extract-pages.tex
new file mode 100644
index 00000000..7cfc1af7
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/extract-pages.tex
@@ -0,0 +1,24 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the doc.extractPages to see all the possible parameters.
+% nStart and nEnd are 0-based page numbers, so nStart:1 and nEnd:2 extracts pages 2 and 3
+\begin{docassembly}
+\retnAbsPathAs(_path);
+_path += "/extracted-pages.pdf";
+\extractPages({
+ nStart: 1,
+ nEnd: 2,
+ cPath: _path
+});
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} \ No newline at end of file
diff --git a/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon-btn.pdf b/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon-btn.pdf
new file mode 100644
index 00000000..7ec1ff98
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon-btn.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon.pdf b/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon.pdf
new file mode 100644
index 00000000..2968aa40
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDon.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDonIcon.pdf b/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDonIcon.pdf
new file mode 100644
index 00000000..284f3d8c
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/graphics/AdobeDonIcon.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/graphics/AeB_Logo.pdf b/texmf-dist/doc/latex/docassembly/examples/graphics/AeB_Logo.pdf
new file mode 100644
index 00000000..c41d81c4
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/graphics/AeB_Logo.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/graphics/girl.pdf b/texmf-dist/doc/latex/docassembly/examples/graphics/girl.pdf
new file mode 100644
index 00000000..4ab32d82
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/graphics/girl.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/graphics/man1.pdf b/texmf-dist/doc/latex/docassembly/examples/graphics/man1.pdf
new file mode 100644
index 00000000..10721588
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/graphics/man1.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/graphics/scot.pdf b/texmf-dist/doc/latex/docassembly/examples/graphics/scot.pdf
new file mode 100644
index 00000000..3133d053
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/graphics/scot.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/import-icons.tex b/texmf-dist/doc/latex/docassembly/examples/import-icons.tex
new file mode 100644
index 00000000..147839fa
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/import-icons.tex
@@ -0,0 +1,56 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{eforms}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the doc.importIcon to see all the possible parameters.
+\begin{docassembly}
+ var retn=\importIcon({cName:"A man",cDIPath:"graphics/man1.pdf"});
+ if ( retn < 0 ) console.println("The file man1.pdf could not be opened or is invalid");
+ var retn=\importIcon({cName:"A girl",cDIPath:"graphics/girl.pdf"});
+ if ( retn < 0 ) console.println("The file girl.pdf could not be opened or is invalid");
+ var retn=\importIcon({cName:"A scotsman",cDIPath:"graphics/scot.pdf"});
+ if ( retn < 0 ) console.println("The file scot.pdf could not be opened or is invalid");
+ var retn=\importIcon({cName:"AdobeDon",cDIPath:"graphics/AdobeDonIcon.pdf"});
+ if ( retn < 0 ) console.println("The file AdobeDonIcon.pdf could not be opened or is invalid");
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\begin{defineJS}{\cycleJS}
+if (typeof indexIcon == "undefined") var indexIcon=0;
+var oIconName=this.icons[indexIcon].name;
+var f=this.getField("iconContainer");
+var oIcon=this.getIcon(oIconName);
+f.buttonPosition=position.iconTextV;
+f.buttonSetIcon(oIcon);
+f.buttonSetCaption(oIconName);
+indexIcon = (indexIcon+1) \% (this.icons.length);
+\end{defineJS}
+% define a clear button feature, it clears the button iconContainer
+% so it no longer displays an icon; pressing the Cycle button resumes
+% the display as before.
+\begin{defineJS}{\clearJS}
+f=this.getField("iconContainer")
+// save
+var sv=f.buttonPosition;
+var cptn=f.buttonGetCaption();
+// clear
+f.buttonPosition=position.textOnly;
+f.buttonSetCaption("");
+\end{defineJS}
+
+\begin{center}\Large\bfseries
+A slide show of Icons and Photos
+\end{center}
+
+\begin{center}
+\pushButton[\BG{}\TP{2}\S{S}]{iconContainer}{100bp}{100bp}\vcgBdry[6bp]
+\pushButton[\CA{Cycle}\AAmouseup{\cycleJS}]{cycleBtn}{}{11bp}\cgBdry[3bp]
+\pushButton[\CA{Clear}\AAmouseup{\clearJS}]{clearBtn}{}{11bp}
+\end{center}
+\end{document}
+
diff --git a/texmf-dist/doc/latex/docassembly/examples/import-sound.tex b/texmf-dist/doc/latex/docassembly/examples/import-sound.tex
new file mode 100644
index 00000000..19f7be11
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/import-sound.tex
@@ -0,0 +1,24 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{eforms}
+%\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the doc.importSound to see all the possible parameters.
+\begin{docassembly}
+\importSound({cName: "StarTrek", cDIPath: "sounds/trek.wav" });
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+
+\begin{center}
+\pushButton[\CA{Star Trek}\S{S}\W{0}\AAmouseup{%
+ var s = this.getSound("StarTrek");\r
+ s.play();
+}]{stSound}{}{11bp}
+
+\end{center}
+\end{document} \ No newline at end of file
diff --git a/texmf-dist/doc/latex/docassembly/examples/insert-pages.tex b/texmf-dist/doc/latex/docassembly/examples/insert-pages.tex
new file mode 100644
index 00000000..eedbaab1
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/insert-pages.tex
@@ -0,0 +1,20 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Review doc.insertPages in the Acrobat JavaScript reference
+\begin{docassembly}
+\insertPages({
+ nPage: this.numPages-1,
+ cPath: "graphics/AdobeDon.pdf"
+});
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} \ No newline at end of file
diff --git a/texmf-dist/doc/latex/docassembly/examples/mail-doc.tex b/texmf-dist/doc/latex/docassembly/examples/mail-doc.tex
new file mode 100644
index 00000000..6240c945
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/mail-doc.tex
@@ -0,0 +1,31 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the doc.mailDoc to see all the possible parameters.
+\begin{docassembly}
+% Prior to sending this document, you can attach files this this PDF
+% Refer to attach-files.tex
+var retn = \attachFile({
+ cName: "AdobeDon",
+ cDIPath: "graphics/AdobeDon.pdf"
+});
+% The next line creates a meaningful description of the attachment
+if (retn) this.getDataObject("AdobeDon").description="The one and only AdobeDon";
+\executeSave();
+\mailDoc({
+ bUI: false,
+ cTo: "dpstory@hotmail.com",
+ cSubject: "I'm testing things out",
+ cMsg: "Good to hear from you again Don. I'm emailing this PDF, attached, for your review."
+});
+%\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} \ No newline at end of file
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
diff --git a/texmf-dist/doc/latex/docassembly/examples/resources/myStory.pdf b/texmf-dist/doc/latex/docassembly/examples/resources/myStory.pdf
new file mode 100644
index 00000000..a4549d21
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/resources/myStory.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/resources/supportDoc.pdf b/texmf-dist/doc/latex/docassembly/examples/resources/supportDoc.pdf
new file mode 100644
index 00000000..c34ac72f
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/resources/supportDoc.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/sign.pdf b/texmf-dist/doc/latex/docassembly/examples/sign.pdf
new file mode 100644
index 00000000..b1fdef0f
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/sign.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/sign.tex b/texmf-dist/doc/latex/docassembly/examples/sign.tex
new file mode 100644
index 00000000..0581f1eb
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/sign.tex
@@ -0,0 +1,206 @@
+% C:\Users\dpstory\AppData\Roaming\Adobe\Acrobat\Beta\Security\DonStory.pfx
+\documentclass[12pt]{article}
+\usepackage{eforms}
+\usepackage{docassembly}
+\usepackage{fancyvrb}
+
+\hypersetup{pdfpagemode=UseNone}
+
+
+\newcommand{\cs}[1]{\texttt{\char`\\#1}}
+
+\pagestyle{empty}
+\parskip\medskipamount
+\parindent0pt
+
+% Do not compile until you have a digital ID and password
+% Actually, you can compile, but do not bring the PDF into Acrobat until you have a digital ID and password.
+% You can view the PDF in other PDF viewers such as SumatraPDF.
+\begin{docassembly}
+\sigInfo{
+ cSigFieldName: "sigOfDPS",
+ cert: "D_P_Speaker.pfx",
+ password: "password",
+ oInfo: {
+ location: "AcroTeX Central, FL",
+ reason: "I am approving this document for distribution",
+ contactInfo: "dpspeaker@talking.edu",
+ appearance: "My Signature"
+% appearance: "My Image"
+ }
+};
+\signatureSign
+\end{docassembly}
+
+\begin{document}
+
+
+%\maketitle
+
+\hfill\smash{\raisebox{-\baselineskip}{March 23, 2009}}
+
+\begin{tabular}{@{}ll}
+To: &Honorable Barrister Maxwell Frimpong\\
+From: &D. P. Speaker\\
+Subject: &On Business Proposal\\
+\end{tabular}
+
+\vspace{2\baselineskip}
+
+Dear Mr.\ Frimpong;
+
+Thank you for thinking of me concerning an ``important business proposal'' in
+your recent and brief email to me on March 23, 2009. Recovering \$12,000,000
+(twelve million US dollars) in claims sounds intriguing and exciting to me.
+Such a large amount of money would certainly come in handy in these tough
+times. Yet, regrettably, I must decline your kind offer; though I am in
+retirement, I am, none-the-less, quite busy lately sorting my button
+collection, and don't really have the time to pick up all this easy money.
+
+Thank you again, Barrister Frimpong, for your offer. Please keep me
+in mind should future opportunities arise.
+
+
+\vspace{2\baselineskip}
+
+Best regards,\\
+\sigField{sigOfDPS}{2.5in}{4\baselineskip}\\[3pt]
+Dr.\ D. P. Speaker\\
+Department of Rhetoric,\\
+Talking University\\
+Talkville, FL 12345\\
+\texttt{dpspeaker@talking.edu}
+
+
+\newpage
+
+\section{Creating and Signing a Signature Field}
+
+The \textsf{eforms} package can create a signature field with the \cs{sigField} command, and
+using the \textsf{aeb\_pro} package with its \texttt{docassembly} environment, can also sign the field
+from a {\LaTeX} source.
+
+The {\LaTeX} code for creating the signature field of this document is
+\begin{Verbatim}[xleftmargin=20pt,fontsize=\small]
+Best regards,\\
+\sigField{sigOfDPS}{2.5in}{4\baselineskip}\\[3pt]
+Dr.\ D. P. Speaker\\
+Department of Rhetoric,\\
+Talking University\\
+Talkville, FL 12345\\
+\texttt{dpspeaker@talking.edu}
+\end{Verbatim}
+The \cs{sigField} command appears in the second line, and uses the usual
+syntax for form fields, as defined in the \textsf{eforms} package.
+Here's what the field looks like when it is unsigned.
+
+\sigField{sigOfDPS1}{2.5in}{4\baselineskip}
+
+Once the field is created, it can be signed using the Acrobat or Adobe
+Reader (version 10.0.1 or later) user interface.
+
+A signature field may also be signed programmatically from the {\LaTeX}
+source file using AeB Pro. The first signature field of this document
+was automatically signed when the newly created PDF is brought into
+Acrobat.
+\begin{Verbatim}[xleftmargin=20pt,fontsize=\footnotesize]
+\begin{docassembly}
+\sigInfo{
+ cSigFieldName: "sigOfDPS",
+ cert: "<name>.pfx", password: "<password>",
+ oInfo: {
+ location: "AcroTeX Central, FL",
+ reason: "I am approving this document for distribution",
+ contactInfo: "dpspeaker@talking.edu",
+ appearance: "My Signature" }
+};
+\signatureSign
+\end{docassembly}
+\end{Verbatim}
+The script above was used to programmatically sign the signature field
+with field name of \texttt{sigOfDPS}. The value of the \texttt{password}
+key to protect my secrets. The first command, \cs{sigInfo}, creates an
+JavaScript object, \texttt{oSigInfo}. The command \cs{signatureSign} uses
+the information in this object to sign the field designated by the
+\texttt{cSigFieldName} property.
+
+The general syntax of the argument of \cs{sigInfo} is displayed below.
+\def\meta#1{$\langle\textsl{\texttt{#1}}\rangle$}
+\begin{Verbatim}[xleftmargin=20pt,fontsize=\footnotesize,commandchars={!()}]
+\sigInfo{
+ cSigFieldName: "!meta(sigFldName)",
+ oHandler: !meta(securityHandlerObj),
+ path2Cert: !meta(path),
+ cert: "!meta(certName).pfx",
+ password: "!meta(password)",
+ bUI: true|false;
+ oInfo: {
+ !meta(various properties)
+ }
+}
+\end{Verbatim}
+The first five keys are used by AeB Pro to build the proper information
+needed sign the field.
+\begin{description}
+ \item[\normalfont\texttt{cSigFieldName} (required)] The
+ name of the signature field to be signed.
+ \item[\normalfont\texttt{oHandler} (optional)] The security
+ handler to be used. If this key is not present,
+ \texttt{security.PPKLiteHandler} is used.
+ \item[\normalfont\texttt{path2Cert} (optional)] The
+ device-independent path to the PFX file to be used. If not
+ present, AeB Pro uses the name provided by the \texttt{cert} key
+ and builds the path to where Acrobat normally saves digital IDs.
+ \item[\normalfont\texttt{cert} (optional)] The name of the digital
+ ID to be used for signing. Optional if \texttt{path2Cert} is
+ provided, required otherwise.
+ \item[\normalfont\texttt{password} (required)] The password for the PFX file
+ provided, necessary to login to the security handler (\texttt{oHandler}).
+ \item [\normalfont\texttt{bUI} (optional)] A Boolean, if
+ \texttt{true} the security handler displays the user interface
+ when signing. The default is \texttt{false}.
+ \item[\normalfont\texttt{oInfo} (optional)] The \texttt{oInfo} property key is
+ one that appears in the argument property list of the
+ \texttt{\textsl{Field}.signatureSign()} method. It is passed to
+ the argument of this JavaScript method. See the documentation of
+ \texttt{\textsl{Field}.signatureSign()} in the
+ \emph{JavaScript for Acrobat API Reference} for more information.
+\end{description}
+
+Additional information on signatures is found at the
+\textbf{Acrobat Developer Center}.\footnote{\url{http://www.adobe.com/go/acrobat_developer}}
+Refer to the \emph{JavaScript for Acrobat API Reference}, also found at the \textbf{Acrobat Developer Center},
+for details on these methods and their parameters. Adobe is
+notorious for moving its reference documents and renaming them, year after
+year. Good luck searching the Adobe web site for the references you need.
+
+\section{Compiling this file}
+
+In the preamble of this document, the \texttt{docassembly} environment is found:
+\begin{Verbatim}[xleftmargin=20pt,fontsize=\small]
+\begin{docassembly}
+\sigInfo{
+ cert: "<name>.pfx", password: "<password>",
+ oInfo: {
+ location: "AcroTeX Central, FL",
+ reason: "I am certifying this document",
+ mdp: "defaultAndComments",
+ contactInfo: "dpspeaker@talking.edu"
+ }
+};
+\certifyInvisibleSign
+\end{docassembly}
+\end{Verbatim}
+To compile this document yourself, you need to create a digital ID using
+\textsf{Acrobat}. Replace \texttt{<name>} with the file name of your digital
+ID. and of course replace \texttt{<password>} with the password you selected
+when you created your digital ID. Modify the \texttt{oInfo} property as
+designed.
+
+
+Now, back to my retirement.
+
+\end{document}
+
+Digital Signatures Workflow Guide
+http://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/index.html
diff --git a/texmf-dist/doc/latex/docassembly/examples/sounds/trek.wav b/texmf-dist/doc/latex/docassembly/examples/sounds/trek.wav
new file mode 100644
index 00000000..b8d9e65d
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/sounds/trek.wav
Binary files differ
diff --git a/texmf-dist/doc/latex/docassembly/examples/watermark-file.tex b/texmf-dist/doc/latex/docassembly/examples/watermark-file.tex
new file mode 100644
index 00000000..c7b9f10f
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/watermark-file.tex
@@ -0,0 +1,25 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the addWatermarkFromFile to see all the possible parameters.
+\begin{docassembly}
+\retnAbsPathAs(_path);
+_path += "/graphics/AeB_Logo.pdf";
+\addWatermarkFromFile({
+ bOnTop:false,
+ bOnPrint:false,
+ nOpacity: 0.2,
+ nRotation: 90,
+ cDIPath:_path
+});
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} \ No newline at end of file
diff --git a/texmf-dist/doc/latex/docassembly/examples/watermark-text.tex b/texmf-dist/doc/latex/docassembly/examples/watermark-text.tex
new file mode 100644
index 00000000..4b4c123b
--- /dev/null
+++ b/texmf-dist/doc/latex/docassembly/examples/watermark-text.tex
@@ -0,0 +1,26 @@
+\documentclass{article}
+\usepackage{docassembly}
+\usepackage{lipsum}
+
+\hypersetup{pdfpagemode=UseNone}
+
+% Look in the Adobe Acrobat JavaScript manual under the addWatermarkFromText to see all the possible parameters.
+\begin{docassembly}
+\addWatermarkFromText({
+ cText: "Confidential",
+ aColor: color.red,
+ nFontSize: 72,
+ cFont:font.HelvB,
+ bOnTop:false,
+ bOnPrint:false,
+ nOpacity: 0.2,
+ nRotation: 45
+});
+\executeSave();
+\end{docassembly}
+
+\begin{document}
+
+\lipsum[1-30]
+
+\end{document} \ No newline at end of file
diff --git a/texmf-dist/source/latex/docassembly/docassembly.dtx b/texmf-dist/source/latex/docassembly/docassembly.dtx
new file mode 100644
index 00000000..0f92b429
--- /dev/null
+++ b/texmf-dist/source/latex/docassembly/docassembly.dtx
@@ -0,0 +1,538 @@
+%\iffalse
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% docassembly.sty package, %%
+%% Copyright (C) 2021 D. P. Story %%
+%% dpstory@acrotex.net %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Project Public License %%
+%% Distributed from CTAN archives in directory %%
+%% macros/latex/base/lppl.txt; either version 1.2 of %%
+%% the License, or (at your option) any later version. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+%<package>\ProvidesPackage{docassembly}
+%<package> [2021/06/19 v1.2 docassembly: Post PDF creation assembly (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{amstext}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
+\pdfstringdefDisableCommands{\let\\\textbackslash}
+\def\CMD#1{\textbackslash{#1}}\def\EXCL{!}
+\let\opt\texttt \let\app\textsf \let\pkg\textsf \let\env\texttt
+\OnlyDescription % comment out for implementation details
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\bgroup\ttfamily
+\gdef\brpr#1{\char123\relax#1\char125\relax}\egroup
+\let\darg\brpr
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\let\uif\textsf
+\def\visispace{\symbol{32}}
+\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
+\def\meta#1{\textsl{\texttt{#1}}}
+\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
+\let\tops\texorpdfstring
+\makeatletter
+\let\@latex@warning@no@line\@gobble
+\renewcommand{\paragraph}
+ {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}
+ {\normalfont\normalsize\bfseries}}
+\makeatother
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{docassembly}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{docassembly}{aebdocfmt.def cannot be found}}
+\begin{document}
+ \GetFileInfo{docassembly.sty}
+ \title{The \pkg{docassembly} package}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@acrotex.net}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \DocInput{docassembly.dtx}
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex}{\paragraph*{Index} The index goes here. Execute
+ \[\texttt{makeindex -s gind.ist -o docassembly.ind docassembly.idx}\] on the command line and recompile
+ \texttt{docassembly.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
+ \[\texttt{makeindex -s gglo.ist -o docassembly.gls docassembly.glo}\] on the command line and recompile
+ \texttt{docassembly.dtx}.}
+\end{document}
+%</driver>
+% \fi
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{docassembly}{Inputting aebdonotindex.def}}
+% {\PackageInfo{docassembly}{cannot find aebdonotindex.def}}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% \section{Introduction}
+%
+% The \pkg{docassembly} package provides access some security related features of the
+% Acrobat JavaScript API.
+% The content of this package was extracted from \pkg{aeb\_pro}
+% so these important and useful methods can be available to document authors that own
+% \app{Acrobat}, but enjoy the use of \app{pdflatex}, \app{xelatex}, \app{lualatex},
+% \app{ps2pdf}, or (in the worst case scenario) \app{Adobe Distiller} as PDF creators.
+% \begin{center}
+% \fbox{\begin{minipage}{.67\linewidth}
+% \textbf{Important:} Run for your lives! This package requires
+% \app{Adobe Acrobat}! Run! Do not look back!. However, if it makes you feel better,
+% you can use any of the usual
+% PDF creators (\app{pdflatex}, \app{lualatex}, \app{xelatex}, \app{dvips \texttt{->} ps2pdf},
+% or even the much hated \app{dvips \texttt{->} Adobe Distiller}).
+% \end{minipage}}
+% \end{center}
+% This package requires \pkg{insdljs}\marginpar{\raggedleft\itshape\pkg{insdljs} pkg},\footnote{Part of the \pkg{acrotex} bundle} which loads \pkg{hyperref}. It also requires
+% the successful installation of the file \texttt{aeb\_pro.js}, which is distributed
+% by the \pkg{acrotex-js} package\marginpar{\raggedleft\itshape\pkg{acrotex-js} pkg}, dated 2021/06/19 or later. Version 1.6.1 of
+% \texttt{aeb\_pro.js} is required\marginpar{\raggedleft\itshape Version 1.6.1 required}.\footnote{If you already have \pkg{aeb\_pro} installed on your
+% system, be sure you have Version 1.6.1 of \texttt{aeb\_pro.js}, if not, use the version
+% of \texttt{aeb\_pro.js} that comes with \pkg{acrotex-js}.} Installation of \texttt{aeb\_pro.js}
+% is explained in \texttt{install\_jsfiles.pdf}, found in the \texttt{docs} folder of the \pkg{acrotex-js} package.
+%
+% \changes{v1.2}{2021/06/19}{Revise documentation to reflect changes in changes in the \string\pkg{acrotex-js} package}
+% \changes{v1.1}{2021/06/18}{The \string\texttt{aeb\_pro.js} file is now distributed by the
+% \string\pkg{acrotex-js} package}
+% \changes{v1.0}{2021/06/11}{First publication version of this package}
+%
+% \section{Documentation}
+%
+% The documentation of this file is minimal. Most of
+% the ``teaching'' of how to use the methods supported by this package is contained
+% in the demo files.
+%
+% The package defines one environment, the \env{docassembly} environment, and several
+% ``helper'' commands that are used within the \env{docassembly} environment. Refer
+% to \hyperref[s:DAM]{Section~\ref*{s:DAM}} for details.
+%
+%
+% \paragraph*{Installation of \texttt{aeb\_pro.js}.} This file is essential to the
+% correct functioning of this package. It is important, therefore, to correctly
+% install it. If \texttt{aeb\_pro.js} is not already installed, download (if not already on your system)
+% and install the \pkg{acrotex-js} package (dated 2021/06/19 or later);\footnote{\url{https://www.ctan.org/pkg/acrotex-js}} \texttt{aeb\_pro.js} is located
+% in the \texttt{js-files} folder. Refer to the documentation of the \pkg{acrotex-js} package,
+% \texttt{docs/install\_jsfiles.pdf}, for information on how to install \texttt{aeb\_pro.js}.
+% The current version of \texttt{aeb\_pro.js} is Version 1.6.1.
+%
+% \paragraph*{Demo files.} Demo files are contained in the \texttt{examples} folder.
+% They illustrate all the security restricted methods of this package.
+% Most of the demo files have a minimal preamble.
+% Several of the files also uses \pkg{eforms}, since form fields
+% are used in those demo files.
+%
+% \paragraph*{End this package early.}
+% If \pkg{aeb\_pro} is already loaded, terminate this package early
+% since \pkg{aeb\_pro} contains the content of this package already.
+% \begin{macrocode}
+\@ifpackageloaded{aeb_pro}{\PackageInfo{docassembly}
+ {aeb_pro detected, early exit from\MessageBreak
+ the docassembly package}\endinput}{}
+\edef\da@restoreCats{%
+ \catcode`\noexpand\"=\the\catcode`\"\relax
+ \catcode`\noexpand\,=\the\catcode`\,\relax
+ \catcode`\noexpand\(=\the\catcode`\(\relax
+ \catcode`\noexpand\!=\the\catcode`\!\relax
+}
+\@makeother\"\@makeother\,\@makeother\(\@makeother\!
+% \end{macrocode}
+% \section{Package requirements}
+% Require \pkg{insdljs} for this little exercise.
+% \begin{macrocode}
+\RequirePackage{insdljs}
+\execJSOn
+% \end{macrocode}
+% The critical JavaScript files are no longer distributed with this package,
+% but are distributed by the \pkg{acrotex-js} package. This package must be
+% installed, and the instructions in the \texttt{docs} folder followed to
+% propery install the critical JavaScript file \texttt{aeb\_pro.js}.
+% \begin{macrocode}
+\IfFileExists{acrotex-js.sty}{\let\reqpkg\relax}
+% \end{macrocode}
+% If the style file \texttt{acrotex-js.sty} is detected, we assume the document
+% author has correctly installed \texttt{aeb\_pro.js}, if not, we require
+% this package, which may be automatically installed on some {\TeX} systems.
+% \begin{macrocode}
+ {\PackageWarningNoLine{docassembly}
+ {The acrotex-js package is required.\MessageBreak
+ Before continuing, install this package,\MessageBreak
+ read the documentation, and place\MessageBreak
+ aeb_pro.js in the expected folder}
+ \def\reqpkg{\usepackage{acrotex-js}[2021/06/19]}
+ }
+\reqpkg
+% \end{macrocode}
+%
+% \section{Document Assembly Methods}\label{s:DAM}
+% Special ``helper'' commands and one environment are defined to take advantage of \app{Acrobat}'s extensive
+% library of security restricted methods. It is assumed the document author has properly
+% installed \texttt{aeb\_pro.js}.
+%
+% \subsection{The \texttt{docassembly} environment}
+%
+% \begin{environment}{docassembly}
+% This is a wrapper environment for the \texttt{execJS} environment of the
+% \textsf{insDLJS} Package. Place JavaScript lines in this environment and
+% the script will execute one time after the PDF has been created and opened
+% in \app{Acrobat Pro} for the first time.
+% \begin{macrocode}
+\newenvironment{docassembly}{\execJS{docassembly}}{\endexecJS}
+% \end{macrocode}
+% \end{environment}
+% \subsection{Supported Assembly JS API}
+%
+% These are convenience commands -- called JavaScript helper commands -- to
+% executing security restricted JavaScript. The JS methods are defined in the
+% \texttt{aeb\_pro.js} file, kept as folder JavaScript. These commands are
+% executed in a verbatim environment where `\verb!\!' is still the escape
+% character. Each of the JavaScript helper commands expects a left
+% parenthesis `\texttt{(}' following the command name \emph{on the
+% same line} as the command name.\footnote{This requirement is consistent
+% with JavaScript function usage.}
+% See the example below for correct usage.
+%\begin{verbatim}
+%\begin{docassembly}
+%\addWatermarkFromFile({
+% bOnTop:false,
+% cDIPath:"/C/AcroTeX/AcroPackages/ManualBGs/Manual_BG_Print_AeB.pdf"
+%});
+%\end{docassembly}
+%\end{verbatim}
+% For each of the methods below, see the \textsl{JavaScript for Acrobat API Reference}.
+%
+%\medskip\noindent The command \cs{theDocObject} is normally set to \texttt{this}, meaning
+% the current document. You may need to set it to some other doc object if you are trying to
+% access a doc object other than the current one.
+% The following are support commands for changing \cs{theDocObject}
+% from within the \texttt{docassembly} environment.
+% \begin{macro}{\chngDocObjectTo}
+% All the JavaScript helper commands use \cs{theDocObject}, which is defined to be the \texttt{this}
+% object. To change it within the \env{docassembly} environment is difficult. The next command
+% aids in that problem.
+% \begin{macrocode}
+\let\ap@mrk\@empty
+\def\ap@gobtocomma#1,{}
+\providecommand\chngDocObjectTo[2]{%
+ \def#1##1\ap@mrk{#2,\ap@gobtocomma##1}}
+% \end{macrocode}
+% \end{macro}
+% The above defines a new command given by \texttt{\#1}. The command has one argument which is all content
+% up to the terminating mark \cs{ap@mrk}. The trick to removing \cs{thisDocObject} and replacing it with
+% \texttt{\#2}, in the above definition, we insert `\texttt{(\#2}' followed by \cs{ap@gobtocomma}, which absorbs
+% \cs{thisDocObject,} (absorbs everything through the first comma), followed by all content (\texttt{\#\#1});
+% the second \cs{@gobble} absorbs the left
+% parenthesis that opens the argument.
+% \begin{macrocode}
+\def\ap@TF{aebTrustedFunctions}
+% \end{macrocode}
+% An example of usage of \cs{chngDocObject} is \verb~\chngDocObjectTo{\newDO}{doc}~
+% expanded above the \texttt{docassembly} environment. Later, we can say,
+%\begin{verbatim}
+% \chngDocObjectTo{\newDO}{doc}
+% \begin{docassembly}
+% ...
+% \docSaveAs\newDO({ cPath: _path });
+% ...
+% \end{docassembly}
+%\end{verbatim}
+%That is, it is placed immediately after any of the commands below that uses \cs{theDocObject}.
+% \begin{macro}{\theDocObject}
+% This command is used in the definition of all JavaScript helper commands, as seen in the
+% definition of \cs{DeclareJSHelper} below. It is set to the doc object \texttt{this}. It can
+% be changed using \cs{chngDocObjectTo}, as described above.
+% \begin{macrocode}
+\def\theDocObject{this}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\DeclareJSHelper}
+% A general purpose command for defining what I am calling JavaScript helper commands.
+% \begin{macrocode}
+\providecommand\DeclareJSHelper[2]{%
+ \def#1##1({\ap@TF(##1\theDocObject,#2,\ap@mrk}}
+% \end{macrocode}
+% For example, we declare |\DeclareJSHelper{\docSaveAs}{aebDocSaveAs}| below, the declaration defines a new command,
+% \cs{docSaveAs}:
+%\begin{verbatim}
+% \def\docSaveAs#1({\ap@TF(#1\theDocObject,aebDocSaveAs,\ap@mrk}}
+%\end{verbatim}
+% Note that the argument of \cs{docSaveAs} is delimited by the left parenthesis, thus \texttt{\#1} is everything through that opening
+% parenthesis. This approach allows more flexibility in the definition, there can be spaces following the
+% command name |\docSaveAs ({path: _path})|, for example.
+% \end{macro}
+% \begin{macro}{\retnAbsPathAs}
+% Several methods require an absolute path to the current folder. The code is,
+%\begin{verbatim}
+%var _path=this.path;
+%var pos=_path.lastIndexOf("/");
+%_path=_path.substring(0,pos);
+%\end{verbatim}
+%We simplify this code for the document author in the form of the
+%command \cs{rtnAbsPathAs(\ameta{js-var});}, where \ameta{js-var} is a JavaScript
+%variable that will hold the absolute path to the current folder; eg, |\rtnAbsPathAs(_path);|
+%expands to the above code.
+% \begin{macrocode}
+\def\retnAbsPathAs(#1){var #1=this.path;^^J%
+ var pos=#1.lastIndexOf("/");^^J%
+ #1=#1.substring(0,pos)}
+% \end{macrocode}
+% \end{macro}
+% We new begin the documentation of the ``helper'' commands. For documentation
+% of the arguments of these commands, refer to the \textsl{\href{https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/documentation.html}{JavaScript${}^{\text{\textsc{tm}}}$ for Acrobat${}^{\text{\copyright}}$ API Reference}}.
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{addWatermarkFromFile}}
+% \begin{macro}{\addWatermarkFromFile}
+% This is the method \texttt{\textsl{Doc}.addWatermarkFromFile}.\\
+% \textbf{Demo file:} \texttt{watermark-file.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\addWatermarkFromFile}{aebAddWatermarkFromFile}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{addWatermarkFromText}}
+% \begin{macro}{\addWatermarkFromText}
+% This is the method \texttt{\textsl{Doc}.addWatermarkFromText}.\\
+% \textbf{Demo file:} \texttt{watermark-text.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\addWatermarkFromText}{aebAddWatermarkFromText}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{importIcon}}
+% \begin{macro}{\importIcon}
+% This is the method \texttt{\textsl{Doc}.importIcon}.\\
+% \textbf{Demo file:} \texttt{import-icons.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\importIcon}{aebImportIcon}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{importSound}}
+% \begin{macro}{\importSound}
+% This is the method \texttt{\textsl{Doc}.importSound}.\\
+% \textbf{Demo file:} \texttt{import-sound.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\importSound}{aebImportSound}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{appopenDoc}}
+% \begin{macro}{\appopenDoc}
+% This is the method \texttt{app.openDoc}. Opens a document and return
+% a \texttt{Doc} object.\\
+% \textbf{Demo file:} \texttt{open-doc.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\appopenDoc}{aebAppOpenDoc}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{docSaveAs}}
+% \begin{macro}{\docSaveAs}
+% This is the method \texttt{\textsl{Doc}.saveAs}. Saves a PDF or converts a PDF
+% to another format to a specified path.\\
+% \textbf{Demo file:} \texttt{doc-saveas.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\docSaveAs}{aebDocSaveAs}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{insertPages}}
+% \begin{macro}{\insertPages}
+% This is the method \texttt{\textsl{Doc}.insertPages}.\\
+% \textbf{Demo file:} \texttt{insert-pages.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\insertPages}{aebInsertPages}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{extractPages}}
+% \begin{macro}{\extractPages}
+% This is the method \texttt{\textsl{Doc}.extractPages}.\\
+% \textbf{Demo file:} \texttt{extract-pages.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\extractPages}{aebExtractPages}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{createTemplate}}
+% \begin{macro}{\createTemplate}
+% This is the method \texttt{\textsl{Doc}.createTemplate}. This is a feature that I had great
+% hopes for. With templates, you can create hidden pages that can be made visible (in \app{AA});
+% once a template is created, it can be spawned and deleted in \uif{AR}.
+% \begin{macrocode}
+\DeclareJSHelper{\createTemplate}{aebCreateTemplate}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{importDataObject}}
+% \begin{macro}{\importDataObject}
+% This is the method \texttt{\textsl{Doc}.importDataObject}, used to attach files to a PDF; alternately,
+% \cs{attachFile} is a more intuitive name for the operation performed.\DescribeMacro
+% \attachFile\\
+% \textbf{Demo file:} \texttt{attach-files.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\importDataObject}{aebImportDataObject}
+\DeclareJSHelper{\attachFile}{aebImportDataObject}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{executeSave}}
+% \begin{macro}{\executeSave}
+% To save the document, use at the \emph{end of the doc assembly environment}. Usage:
+% \verb!\executeSave()!. The \cs{@gobble} used below absorbs the comma that is placed immediately
+% after the second argument by \cs{DeclareJSHelper}.
+% \begin{macrocode}
+\DeclareJSHelper{\executeSave}{aebSaveAs,"Save"\@gobble}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\tops{\protect\cs}{\textbackslash}{mailDoc}}
+% \begin{macro}{\mailDoc}
+% This is the method \texttt{\textsl{Doc}.mailDoc}.
+% Attach the current PDF and email it someone. Must have a default mail client
+% registered by \app{Acrobat} under \uif{Edit \texttt> Preferences \texttt> Mail Accounts}.\\
+% \textbf{Demo file:} \texttt{mail-doc.tex}
+% \begin{macrocode}
+\DeclareJSHelper{\mailDoc}{aebMailDoc}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Signature related commands}
+% \textbf{Demo files:} \texttt{sign.tex}, \texttt{certifyinvisible.tex}\par\medskip
+% \noindent
+% The \cs{sigInfo} command is used for entering signing formation into what will
+% become an object. \cs{signatureSign} takes no arguments, but uses the info
+% entered by \cs{sigInfo}. An example is
+%\begin{verbatim}
+%\begin{docassembly}
+%\sigInfo{
+% cSigFieldName: "sigOfDPS",
+% ohandler: security.PPKLiteHandler,
+% cert: "<name>.pfx", password: "<password>",
+% oInfo: { location: "Niceville, FL",
+% reason: "I am approving this document",
+% contactInfo: "dpstory@acrotex.net",
+% appearance: "My Signature" }
+%};
+%\signatureSign
+%\end{docassembly}
+%\end{verbatim}
+% \begin{macro}{\sigInfo}
+% The \cs{sigInfo} command is a latex interface to creating the
+% \texttt{oSigInfo} object.
+% \begin{macrocode}
+\newcommand{\sigInfo}{var oSigInfo=}
+\def\sigFieldObj(#1){var oSigField=this.getField(#1)}
+% \end{macrocode}
+% \end{macro}
+% For the \cs{signatureSetSeedValue}, the field object is required.
+% This function assumes that the JavaScript variable \texttt{oSigField}
+% is the field object. For examle,
+%\begin{verbatim}
+%\begin{docassembly}
+%\sigFieldObj("sigOfDPS");
+%\signatureSetSeedValue({
+% lockDocument:true,
+% appearanceFilter:"My Signature",
+% reasons: ["This is a reason", "This is a better reason"],
+% flags:0x80|0x100|0x8
+%});
+%\end{docassembly}
+%\end{verbatim}
+% The \texttt{signatureSetSeedValue()} method seeds a signature field with various default values
+% available to the signer.
+%\begin{verbatim}
+%\begin{docassembly}
+%var sv={
+% mdp: "defaultAndComments",
+% reasons: ["This is a reason", "This is a better reason"],
+% flags:0x80|0x100|0x8
+%};
+%\sigFieldObj("sigOfDPS");
+%\signatureSetSeedValue(sv);
+%\end{docassembly}
+%\end{verbatim}
+% \begin{macro}{\signatureSetSeedValue}
+% This is the \texttt{\textsl{Field}.signatureSetSeedValue} method. The field name
+% is passed to this method through the \texttt{cSigFieldName} property of the \texttt{oSigField} object.
+% \begin{macrocode}
+\def\signatureSetSeedValue#1{%
+ \ap@TF( oSigField, aebSignatureSetSeedValue, }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\signatureSign}
+% This is the \texttt{\textsl{Field}.signatureSign} method. The field name
+% is passed to this method through the \texttt{cSigFieldName} property of the \texttt{oSigField} object.
+% The function \cs{signatureSign} takes the info in the \texttt{oSigInfo} object,
+% gets the security handler object, logs into the handler, calls
+% \texttt{signatureSetSeedValue} if the \texttt{sv} property is in the
+% \texttt{oSigInfo} object, and signs the field.
+%
+% \begin{macrocode}
+\begin{defineJS}[\makecmt\%\dfnJSCR{^^J}]{\signatureSign}
+if ( typeof oSigInfo.oHandler=="undefined" )
+ oSigInfo.oHandler=security.PPKLiteHandler;
+var engine=aebTrustedFunctions( security,%
+aebSecurityGetHandler, oSigInfo.oHandler );
+var path2Cert = (typeof oSigInfo.path2Cert == "undefined") ? %
+aebTrustedFunctions( this, aebAppGetPath,%
+{cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert : %
+oSigInfo.path2Cert;
+aebTrustedFunctions( engine, aebSecurityHandlerLogin,%
+{ cPassword: oSigInfo.password, cDIPath: path2Cert});
+var oSigField = this.getField(oSigInfo.cSigFieldName);
+oSigInfo.oInfo.password=oSigInfo.password;
+if ( typeof oSigInfo.sv!="undefined" ) {
+ for (var o in oSigInfo.sv )
+ oSigInfo.oInfo[o]=oSigInfo.sv[o];
+}
+var oSigArgs={ oSig: engine, oInfo: oSigInfo.oInfo };
+if ( typeof oSigInfo.cLegalAttest!="undefined" )
+ oSigArgs.cLegalAttest=oSigInfo.cLegalAttest;
+if ( typeof oSigInfo.cDIPath!="undefined")
+ oSigArgs.cDIPath=oSigInfo.cDIPath;
+if ( typeof oSigInfo.bUI!="undefined")
+ oSigArgs.bUI=oSigInfo.bUI;
+aebTrustedFunctions( oSigField, aebSignatureSign, oSigArgs );
+\end{defineJS}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\certifyInvisibleSign}
+% This is the \texttt{\textsl{Doc}.certifyInvisibleSign} method.
+% This command uses the trusted version of \texttt{certifyInvisibleSign} to sign. The command
+% requires that \cs{sigInfo} is populated appropriately.
+%\begin{verbatim}
+%\begin{docassembly}
+%\sigInfo{
+% cert: "<name>.pfx",
+% password: "<password>",
+% cLegalAttest: "Certified using JavaScript",
+% bUI:false,
+% oInfo: {
+% location: "Niceville, FL",
+% reason: "I am certifying this document",
+% mdp: "defaultAndComments",
+% }
+%};
+%\certifyInvisibleSign
+%\end{docassembly}
+%\end{verbatim}
+% \begin{macrocode}
+\begin{defineJS}[\makecmt\%\dfnJSCR{^^J}]{\certifyInvisibleSign}
+if ( typeof oSigInfo.oHandler=="undefined" )
+ oSigInfo.oHandler=security.PPKLiteHandler;
+var engine=aebTrustedFunctions( security, %
+aebSecurityGetHandler, oSigInfo.oHandler );
+var path2Cert=aebTrustedFunctions( this, aebAppGetPath, %
+{cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert;
+aebTrustedFunctions( engine, aebSecurityHandlerLogin, %
+{ cPassword: oSigInfo.password, cDIPath: path2Cert});
+oSigInfo.oInfo.password=oSigInfo.password;
+var oSigArgs={ oSig: engine, oInfo: oSigInfo.oInfo };
+if ( typeof oSigInfo.cLegalAttest!="undefined" )
+ oSigArgs.cLegalAttest=oSigInfo.cLegalAttest;
+if ( typeof oSigInfo.cDIPath!="undefined")
+ oSigArgs.cDIPath=oSigInfo.cDIPath;
+if ( typeof oSigInfo.bUI!="undefined")
+ oSigArgs.bUI=oSigInfo.bUI;
+aebTrustedFunctions( this, aebCertifyInvisibleSign, oSigArgs );
+\end{defineJS}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\da@restoreCats
+%</package>
+% \end{macrocode}
+% \Finale
+\endinput
diff --git a/texmf-dist/source/latex/docassembly/docassembly.ins b/texmf-dist/source/latex/docassembly/docassembly.ins
new file mode 100644
index 00000000..b028064e
--- /dev/null
+++ b/texmf-dist/source/latex/docassembly/docassembly.ins
@@ -0,0 +1,59 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 2021 D. P. Story
+%%
+%% This file is part of the AcroTeX eDucation Bundle (AeB).
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2021/06/11}
+\def\batchfile{docassembly.ins}
+
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+
+\generate{%
+ \file{docassembly.sty}{\from{docassembly.dtx}{copyright,package}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/tex/latex/docassembly/docassembly.sty b/texmf-dist/tex/latex/docassembly/docassembly.sty
new file mode 100644
index 00000000..50c4b8aa
--- /dev/null
+++ b/texmf-dist/tex/latex/docassembly/docassembly.sty
@@ -0,0 +1,121 @@
+%%
+%% This is file `docassembly.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% docassembly.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% docassembly.sty package, %%
+%% Copyright (C) 2021 D. P. Story %%
+%% dpstory@acrotex.net %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Project Public License %%
+%% Distributed from CTAN archives in directory %%
+%% macros/latex/base/lppl.txt; either version 1.2 of %%
+%% the License, or (at your option) any later version. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+\ProvidesPackage{docassembly}
+ [2021/06/19 v1.2 docassembly: Post PDF creation assembly (dps)]
+\@ifpackageloaded{aeb_pro}{\PackageInfo{docassembly}
+ {aeb_pro detected, early exit from\MessageBreak
+ the docassembly package}\endinput}{}
+\edef\da@restoreCats{%
+ \catcode`\noexpand\"=\the\catcode`\"\relax
+ \catcode`\noexpand\,=\the\catcode`\,\relax
+ \catcode`\noexpand\(=\the\catcode`\(\relax
+ \catcode`\noexpand\!=\the\catcode`\!\relax
+}
+\@makeother\"\@makeother\,\@makeother\(\@makeother\!
+\RequirePackage{insdljs}
+\execJSOn
+\IfFileExists{acrotex-js.sty}{\let\reqpkg\relax}
+ {\PackageWarningNoLine{docassembly}
+ {The acrotex-js package is required.\MessageBreak
+ Before continuing, install this package,\MessageBreak
+ read the documentation, and place\MessageBreak
+ aeb_pro.js in the expected folder}
+ \def\reqpkg{\usepackage{acrotex-js}[2021/06/19]}
+ }
+\reqpkg
+\newenvironment{docassembly}{\execJS{docassembly}}{\endexecJS}
+\let\ap@mrk\@empty
+\def\ap@gobtocomma#1,{}
+\providecommand\chngDocObjectTo[2]{%
+ \def#1##1\ap@mrk{#2,\ap@gobtocomma##1}}
+\def\ap@TF{aebTrustedFunctions}
+\def\theDocObject{this}
+\providecommand\DeclareJSHelper[2]{%
+ \def#1##1({\ap@TF(##1\theDocObject,#2,\ap@mrk}}
+\def\retnAbsPathAs(#1){var #1=this.path;^^J%
+ var pos=#1.lastIndexOf("/");^^J%
+ #1=#1.substring(0,pos)}
+\DeclareJSHelper{\addWatermarkFromFile}{aebAddWatermarkFromFile}
+\DeclareJSHelper{\addWatermarkFromText}{aebAddWatermarkFromText}
+\DeclareJSHelper{\importIcon}{aebImportIcon}
+\DeclareJSHelper{\importSound}{aebImportSound}
+\DeclareJSHelper{\appopenDoc}{aebAppOpenDoc}
+\DeclareJSHelper{\docSaveAs}{aebDocSaveAs}
+\DeclareJSHelper{\insertPages}{aebInsertPages}
+\DeclareJSHelper{\extractPages}{aebExtractPages}
+\DeclareJSHelper{\createTemplate}{aebCreateTemplate}
+\DeclareJSHelper{\importDataObject}{aebImportDataObject}
+\DeclareJSHelper{\attachFile}{aebImportDataObject}
+\DeclareJSHelper{\executeSave}{aebSaveAs,"Save"\@gobble}
+\DeclareJSHelper{\mailDoc}{aebMailDoc}
+\newcommand{\sigInfo}{var oSigInfo=}
+\def\sigFieldObj(#1){var oSigField=this.getField(#1)}
+\def\signatureSetSeedValue#1{%
+ \ap@TF( oSigField, aebSignatureSetSeedValue, }
+\begin{defineJS}[\makecmt\%\dfnJSCR{^^J}]{\signatureSign}
+if ( typeof oSigInfo.oHandler=="undefined" )
+ oSigInfo.oHandler=security.PPKLiteHandler;
+var engine=aebTrustedFunctions( security,%
+aebSecurityGetHandler, oSigInfo.oHandler );
+var path2Cert = (typeof oSigInfo.path2Cert == "undefined") ? %
+aebTrustedFunctions( this, aebAppGetPath,%
+{cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert : %
+oSigInfo.path2Cert;
+aebTrustedFunctions( engine, aebSecurityHandlerLogin,%
+{ cPassword: oSigInfo.password, cDIPath: path2Cert});
+var oSigField = this.getField(oSigInfo.cSigFieldName);
+oSigInfo.oInfo.password=oSigInfo.password;
+if ( typeof oSigInfo.sv!="undefined" ) {
+ for (var o in oSigInfo.sv )
+ oSigInfo.oInfo[o]=oSigInfo.sv[o];
+}
+var oSigArgs={ oSig: engine, oInfo: oSigInfo.oInfo };
+if ( typeof oSigInfo.cLegalAttest!="undefined" )
+ oSigArgs.cLegalAttest=oSigInfo.cLegalAttest;
+if ( typeof oSigInfo.cDIPath!="undefined")
+ oSigArgs.cDIPath=oSigInfo.cDIPath;
+if ( typeof oSigInfo.bUI!="undefined")
+ oSigArgs.bUI=oSigInfo.bUI;
+aebTrustedFunctions( oSigField, aebSignatureSign, oSigArgs );
+\end{defineJS}
+\begin{defineJS}[\makecmt\%\dfnJSCR{^^J}]{\certifyInvisibleSign}
+if ( typeof oSigInfo.oHandler=="undefined" )
+ oSigInfo.oHandler=security.PPKLiteHandler;
+var engine=aebTrustedFunctions( security, %
+aebSecurityGetHandler, oSigInfo.oHandler );
+var path2Cert=aebTrustedFunctions( this, aebAppGetPath, %
+{cCategory:"user"} )+"/Security"+"/"+oSigInfo.cert;
+aebTrustedFunctions( engine, aebSecurityHandlerLogin, %
+{ cPassword: oSigInfo.password, cDIPath: path2Cert});
+oSigInfo.oInfo.password=oSigInfo.password;
+var oSigArgs={ oSig: engine, oInfo: oSigInfo.oInfo };
+if ( typeof oSigInfo.cLegalAttest!="undefined" )
+ oSigArgs.cLegalAttest=oSigInfo.cLegalAttest;
+if ( typeof oSigInfo.cDIPath!="undefined")
+ oSigArgs.cDIPath=oSigInfo.cDIPath;
+if ( typeof oSigInfo.bUI!="undefined")
+ oSigArgs.bUI=oSigInfo.bUI;
+aebTrustedFunctions( this, aebCertifyInvisibleSign, oSigArgs );
+\end{defineJS}
+\da@restoreCats
+\endinput
+%%
+%% End of file `docassembly.sty'.
diff --git a/tlpkg/tlpsrc/docassembly.tlpsrc b/tlpkg/tlpsrc/docassembly.tlpsrc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tlpkg/tlpsrc/docassembly.tlpsrc