summaryrefslogtreecommitdiff
path: root/texmf-dist/doc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2018-06-12 08:07:19 +0900
committerNorbert Preining <norbert@preining.info>2018-06-12 08:07:19 +0900
commit3c18186d7c1bc4aa0a3f5727b5dbe5a251687d9c (patch)
tree5b945b95730cae1a07320b1c1f3d5dece42f796c /texmf-dist/doc
parent76948a9dde88d0b50fd8d5485e2a9e5fff668bd6 (diff)
add qrcstamps
Diffstat (limited to 'texmf-dist/doc')
-rw-r--r--texmf-dist/doc/latex/qrcstamps/README.md20
-rw-r--r--texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.pdfbin0 -> 44221 bytes
-rw-r--r--texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.tex63
-rw-r--r--texmf-dist/doc/latex/qrcstamps/examples/qrc-demo2.tex54
-rw-r--r--texmf-dist/doc/latex/qrcstamps/examples/qrc-demo3.tex142
-rw-r--r--texmf-dist/doc/latex/qrcstamps/qrcstamps-man.pdfbin0 -> 216325 bytes
-rw-r--r--texmf-dist/doc/latex/qrcstamps/qrcstamps.pdfbin0 -> 94392 bytes
7 files changed, 279 insertions, 0 deletions
diff --git a/texmf-dist/doc/latex/qrcstamps/README.md b/texmf-dist/doc/latex/qrcstamps/README.md
new file mode 100644
index 00000000..692d3f87
--- /dev/null
+++ b/texmf-dist/doc/latex/qrcstamps/README.md
@@ -0,0 +1,20 @@
+Package: qrcstamps
+Author: D. P. Story
+Dated: 2018/06/02
+
+The qrcstamps package enables the document author to create QR Codes, the
+QR Code Symbology are caste onto a dynamic stamp annotation.
+
+
+PDF Creator: Adobe Distiller or ps2pdf can be used as the PDF creator, but
+the full Acrobat application is needed to perform post-creation tasks. One the
+document is created and saved, it can be viewed by any appropriate PDF viewer.
+
+Also see http://blog.acrotex.net/ for the latest on my
+ruminations on LaTeX and PDF.
+
+Now, I simply must get back to my retirement.
+
+D. P. Story
+dpstory@uakron.edu
+
diff --git a/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.pdf b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.pdf
new file mode 100644
index 00000000..a131dcbe
--- /dev/null
+++ b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.tex b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.tex
new file mode 100644
index 00000000..91eaa5e3
--- /dev/null
+++ b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo1.tex
@@ -0,0 +1,63 @@
+\documentclass{article}
+\usepackage[forcolorpaper]{web}
+\usepackage[scandoc]{qrcstamps}
+
+\title{Create QR Code Symbols using Stamps}
+\author{D. P. Story}
+\email{dpstory@acrotex.net}
+\subject{Creating QR Code symbols using Acrobat annotation stamps and LaTeX}
+\keywords{stamp annotations, QR Code, LaTeX, PDF, AcroTeX}
+
+\useFullWidthForPaper
+\previewOff
+
+\def\cs#1{\texttt{\char`\\#1}}
+
+\parindent0pt\parskip6pt
+
+\begin{document}
+
+\makeinlinetitle
+
+\textbf{Small}
+
+\defineAPath{\UADPStory}{http://www.math.uakron.edu/~dpstory}
+\qrCode{http://www.acrotex.net} \url{http://www.acrotex.net}\qquad
+\qrCode{mailto:dpstory@acrotex.net} \url{mailto:dpstory@acrotex.net}
+
+\qrCode{Home of AcroTeX.Net Blog\n
+http://www.acrotex.net/blog} \parbox{2in}{Home of Acro\negthinspace\TeX.Net Blog\\
+\url{http://www.acrotex.net/blog}}\hfill\parbox{3.25in}{You can format the
+line of a text message, as is done in the QR symbol to the left, by using
+\cs{n} (new line) within the required argument of \cs{qrCode}.}
+
+
+\textbf{Medium}
+
+%https://theqrplace.wordpress.com/2011/05/02/qr-code-tech-info-mecard-format/
+\qrCode[size=medium]{MECARD:N:Story,Don;NICKNAME:Dr. D. P. Story;
+ADR:1475 AcroTeX Drive, Niceville, FL 32578;TEL:9999999999;EMAIL:dpstory@acrotex.net;
+MEMO:Founder of AcroTeX.Net;
+URL:http://www.acrotex.net;;} (MECARD)
+
+\textbf{Large}
+
+\def\TEXT{%
+Now is the time for all good men to come to the aid of their country.
+Now is the time for all good men to come to the aid of their country.
+Now is the time for all good men to come to the aid of their country.
+Now is the time for all good men to come to the aid of their country.
+Now is the time for all good men to come to the aid of their country.
+Now is the time for all good men to come to the aid of their country.
+%Now is the time for all good men to come to the aid of their country.
+Now is the time for all good men to come to the aid of their country.}
+
+\qrCode[size=large,widthTo=2in,allowresize]{\TEXT} (Now is the time\dots)\hfill
+\parbox{3in}{This is an example of a QR symbol containing text. This paragraph
+is near the limit of 500 characters. If you recompile after un-commenting the
+one line that is commented out, you'll be over the 500 character limit. See
+what happens when you compile. This example as well as others were used in
+the development of the package to check whether there truly is a 500
+character limit.}
+
+\end{document}
diff --git a/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo2.tex b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo2.tex
new file mode 100644
index 00000000..072339ab
--- /dev/null
+++ b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo2.tex
@@ -0,0 +1,54 @@
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage[forcolorpaper]{web}
+\usepackage{eforms}
+\usepackage[scandoc]{qrcstamps}
+
+
+\title{Creating a QR Code Symbol Stamp Interactively}
+\author{D. P. Story}
+\subject{Creating QR Code symbols using Acrobat annotation stamps and LaTeX interactively}
+\email{dpstory@acrotex.net}
+\keywords{stamp, QRCode, stamps}
+
+\useFullWidthForPaper
+
+\parindent0pt\parskip6pt
+
+\begin{document}
+
+\makeinlinetitle
+
+This file demonstrates that it is possible to create QR Code symbols
+interactively. Enter some text into the field below then click on the white
+space outside the field (or press the \texttt{TAB} key) to commit the data.
+The QR Code symbol stamp will be updated appropriately.
+
+\qrCode[size=medium]{http://www.acrotex.net}\space\textField[
+ \TU{Maximum of 250 characters allowed, enter a URL, a mailto, or simply text.}
+ \MaxLen{250}\Ff{\FfMultiline}\AA{\AAKeystroke{%
+if (event.willCommit) {\r\t
+ if (!/^\\s*$/.test(event.value)) {\r
+ var annot=this.getAnnot({nPage:this.pageNum,cName:"\currentAnnotName"});\r\t
+ var props=annot.getProps();\r\t
+ props.author="QRC";\r\t
+ props.subject=event.value;\r\t
+ annot.setProps(props);\r\t
+ delete props.APCosObj;\r\t
+ annot.setProps(props);\r
+ }\r
+}}}]{txtFld}{3in}{11bp*6}
+
+Ignore the JavaScript code, it is somewhat obscure, but it works.
+
+\paragraph*{Requirements for this file} For this QR Code symbol stamp to
+update as designed, the user must (1) be viewing this document in
+\textsf{Acrobat} and (2) the stamp file \texttt{qrc-stamps.pdf}, which comes
+with this distribution, must be installed in the user \texttt{Stamps} folder
+of \textsf{Acrobat}. This file and these techniques work only for you, my dear
+AeB Pro users.
+
+By the way, if you also have Acrobat Reader, try this file in that
+application to see what happens.
+
+\end{document}
diff --git a/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo3.tex b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo3.tex
new file mode 100644
index 00000000..2af0324b
--- /dev/null
+++ b/texmf-dist/doc/latex/qrcstamps/examples/qrc-demo3.tex
@@ -0,0 +1,142 @@
+\documentclass{article}
+\usepackage[web=forcolorpaper,eforms]{aeb_pro}
+\usepackage[scandoc]{qrcstamps}
+%\usepackage{lucidbry}
+
+\previewOff
+
+\title{\texorpdfstring{Modify a QR symbol stamp and (optionally) save it to an Image file}
+ {Modify a QR Symbol and save as Image}}
+\author{D. P. Story}
+\email{dpstory@acrotex.net}
+\subject{Methodology and problems with creating dynamic QR barcode stamps}
+\keywords{stamp, QRCode, stamps}
+\setWindowOptions{showtitle}
+
+\def\cs#1{\texttt{\char`\\#1}}
+
+\useFullWidthForPaper
+
+\parindent0pt\parskip6pt
+
+\chngDocObjectTo{\oDoc}{oDoc}
+%
+% Methodology: When user presses 'Make Image', the page of the doc that contains the stamp
+% is extracted and saved as \jobname_tmp.pdf. It is then attached to the current doc, with
+% annotation name (NM key) of "_qrcpage". The attachment is opened (hidden from user), the page is cropped
+% around the annotation and saved in the desired file format under the specified name. The
+% attachment is then closed and removed.
+%
+\begin{insDLJS}{myqrcjs}{Document JS to support QRC}
+var _oDoc,oDoc;
+function saveQrcAsImage(annotname) {
+ if ( arguments.length > 1) {
+ var f=this.getField(arguments[1]);
+ var i=f.currentValueIndices
+ var faceV=f.getItemAt(i,false) // face
+ var fileExt="."+faceV.toLowerCase();
+ var expV=(faceV=="PDF")?"":f.getItemAt(i,true); // export value
+ } else {
+ var faceV="PNG";
+ var fileExt=".png";
+ expV="com.adobe.acrobat.png";
+ }
+ var annot=this.getAnnot({nPage:this.pageNum,cName:annotname});
+ var props=annot.getProps();
+ var Rect=props.rect;
+ var Page=this.pageNum;
+ var pos=this.path.lastIndexOf("/");
+ var _path=this.path.substring(0,pos);
+% Extract the page the targeted qrc is on, and save it to a tmp file
+ \extractPages({nStart:Page, cPath:"\jobname_tmp.pdf"});
+% Now, attach it to the current document
+ \importDataObject({cName:"_qrcpage", cDIPath:"\jobname_tmp.pdf"});
+% Open the attachment, oDoc is the doc object of this doc
+ oDoc=this.openDataObject("_qrcpage");
+ var basename=app.response({cQuestion:"Enter the name of the file to be saved as a "+faceV+" image",
+ cDefault: "qrcode", cLabel: "Save as "+faceV+":"});
+ if (basename.toLowerCase()=="\jobname".toLowerCase()) {
+ basename=null;
+ app.alert("Selecting \"\jobname\" is not permitted, try another name for the saved image.");
+ }
+ if (basename!=null) {
+%
+% We extracted a single page, the annot lies on page 0
+%
+ oDoc.setPageBoxes({cBox:"Crop",nStart:0,rBox:Rect});
+%
+% From experience, we learn that the page must be flattened before we save to EPS
+% In the case of PDF, unless we flatten, the resultant PDF file will be a stamp
+%
+ if (faceV=="EPS"||faceV=="PDF") oDoc.flattenPages();
+ \docSaveAs\oDoc({cPath:_path+"/"+basename+fileExt,cConvID:expV});
+ oDoc.closeDoc(true);
+ this.removeDataObject("_qrcpage");
+ this.dirty=false;
+ }
+}
+function qrcKeyboard(annotname) {
+ if (event.willCommit) {
+ if (!/^\\s*$/.test(event.value)) {
+ var annot=this.getAnnot({nPage:this.pageNum,cName:annotname});
+ var props=annot.getProps();
+ props.author="QRC";
+ props.subject=event.value;
+ annot.setProps(props);
+ delete props.APCosObj;
+ annot.setProps(props);
+ }
+ }
+}
+\end{insDLJS}
+
+
+
+\begin{document}
+
+\makeinlinetitle
+
+We initially create a QR symbol for the url \url{http://www.acrotex.net}. This QR symbol can be modified
+by entering text in the input box (the field allows a maximum of 75 characters). After you've committed your data, the
+QR symbol will update. The new wrinkle is the ability to save this symbol to an image file (PNG). Do this
+by pressing the \textsf{Make Image} button and entering a file name (or just take the default name). If things
+go as planned, the PNG image of the QR symbol is saved to the folder this PDF was opened from.
+
+\qrCode{http://www.acrotex.net}\space
+\textField[\MaxLen{75}\AA{\AAKeystroke{qrcKeyboard("\currentAnnotName");}}]{txtFld1}{2in}{11bp}\olBdry
+\pushButton[\CA{Make Image}\A{\JS{saveQrcAsImage("\currentAnnotName");}}]{btn1}{}{11bp}
+
+But why stop at PNG files? In the demonstration below, use the dropdown menu to select a graphics format.
+Pressing the \textsf{Make Image} button then saves the QR Code symbol to a graphics file.
+
+\qrCode[allowresize]{http://www.acrotex.net}\space
+\textField[\MaxLen{75}\AA{\AAKeystroke{qrcKeyboard("\currentAnnotName");}}]{txtFld2}{2in}{11bp}\olBdry
+\comboBox[\DV{pdf}\V{pdf}]{cb2}{.6in}{11bp}{%
+[(pdf)(PDF)][(com.adobe.acrobat.jpeg)(JPEG)]
+[(com.adobe.acrobat.png)(PNG)]
+[(com.adobe.acrobat.tiff)(TIFF)]
+[(com.adobe.acrobat.eps)(EPS)]}\olBdry
+\pushButton[\CA{Make Image}\A{\JS{saveQrcAsImage("\currentAnnotName","cb2");}}]{btn2}{}{11bp}
+
+\paragraph*{Requirements for this file} Even more amazing than \texttt{qrc-demo2.pdf}! For this QR Code symbol stamp
+to update and image saved, the user must (1) be viewing this document in
+\textsf{Acrobat} and (2) the stamp file \texttt{qrc-stamps.pdf}, which comes
+with this distribution, must be installed in the user \texttt{Stamps} folder
+of \textsf{Acrobat}. This file and these techniques work only for you, my dear
+AeB Pro users; and as an AeB Pro user, you have installed in the correct
+location on your computer the files \texttt{aeb.js} and \texttt{aeb\_pro.js};
+these are silently used.
+
+\paragraph*{Auxiliary file generated} The method (the action of the \textsf{Make Image} button) creates the PDF
+file \cs{jobname\_tmp.pdf} in the source folder. The file can be later
+deleted.
+
+\paragraph*{Applications} What can you do with the save images? Anything you want. Some suggestions:
+(1) import them into another {\LaTeX} source file using \cs{includegraphics}
+(should you be adverse to using stamps in your document), perhaps you are
+creating a business card;\footnote{I don't need on, I'm retired.} (2) put
+them on your web page, the QR symbol might contain a web address, email, or
+other contact info; and (3) other stuff too numerous to mention.
+
+\end{document}
+
diff --git a/texmf-dist/doc/latex/qrcstamps/qrcstamps-man.pdf b/texmf-dist/doc/latex/qrcstamps/qrcstamps-man.pdf
new file mode 100644
index 00000000..d67bc480
--- /dev/null
+++ b/texmf-dist/doc/latex/qrcstamps/qrcstamps-man.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/qrcstamps/qrcstamps.pdf b/texmf-dist/doc/latex/qrcstamps/qrcstamps.pdf
new file mode 100644
index 00000000..4b4491cd
--- /dev/null
+++ b/texmf-dist/doc/latex/qrcstamps/qrcstamps.pdf
Binary files differ