Whatever message this page gives is out now! Go check it out!
<h3>Downloading Federal Tax Documents</h3>
<p>Please choose the type of your business.</p>
<!--- Create the ColdFusion form to determine which PDF documents to merge. --->
<table>
<cfform action="cfpdfMergeActionTest.cfm" method="post">
<tr><td><cfinput type="radio" name="businessType"
Value="Sole Proprieter">Sole Proprietor</td></tr>
<tr><td><cfinput type="radio" name="businessType"
Value="Partnership">Partnership</td></tr>
<tr><td><cfinput type="radio" name="businessType" Value="S Corporation">
S Corporation</td></tr>
<cfinput type = "hidden" name = "selection required" value = "must make a selection">
<tr><td><cfinput type="Submit" name="OK" label="OK"></td></tr>
</tr>
</cfform>
</table><cfset bizType=#form.businessType#> <!--- Create a variable for the path of the current directory. ---> <cfset thisPath=ExpandPath(".")> <!--- List the files in the taxes subdirectory. ---> <cfdirectory action="list" directory="#thisPath#\taxes" name="filelist"> <!--- The following code loops through the files in the taxes subdirectory. The getInfo action to retrieves the keywords for each file and determines whether the business type matches one of the keywords in the file. If the file contains the business type keyword, ColdFusion adds the file to a comma-separated list. ---> <cfset tempPath=""> <cfloop query="filelist"> <cfset fPath="#thisPath#\taxes\#filelist.name#"> <cfpdf action="GetInfo" source="#fPath#" name="kInfo"></cfpdf> <cfif #kInfo.keywords# contains "#bizType#"> <cfset tempPath=#tempPath# & #fPath# & ","> </cfif> </cfloop> <!--- Merge the files in the comma-separated list into a PDF output file called "taxMerge.pdf". ---> <cfpdf action="merge" source="#tempPath#" destination="taxMerge.pdf" overwrite="yes"/> <h3>Assembled Tax Document</h3> <p>Click the following link to view your assembled tax document:</p> <a href="http://localhost:8500/Lion/taxmerge.pdf"> <p>Your Assembled Tax Document</a></p> |
<DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd"> <PDF result="Out1"> <PDF source="Doc0"/> <TableOfContents maxBookmarkLevel="3" bookmarkTitle="Table of Contents" includeInTOC="false"> <Header styleReference="TOCheaderStyle"/> <Footer styleReference="TOCFooterStyle"/> </TableOfContents> <PDFGroup> <Footer styleReference="FooterStyle"/> <PDF source="Doc1"/> <PDF source="Doc2"/> <PDF source="Doc3"/> <PDF source="Doc4"/> </PDFGroup> </PDF> <StyleProfile name="TOCheaderStyle"> <Header> <Center> <StyledText> <p color="red" font-weight="bold" font="Arial">Table of Contents</p> </StyledText> </Center> </Header> </StyleProfile> <StyleProfile name="TOCFooterStyle"> <Footer> <Right> <StyledText> <p font-size="9pt">Page <_PageNumber/> of <_LastPageNumber/></p> </StyledText> </Right> </Footer> </StyleProfile> <StyleProfile name="FooterStyle"> <Footer> <Left> <StyledText> <p font-size="9pt"><i>CFML Reference</i></p> </StyledText> </Left> <Right> <StyledText> <p font-size="9pt">Page <_PageNumber/> of <_LastPageNumber/></p> </StyledText> </Right> </Footer> </StyleProfile> </DDX> |
<cfset inputStruct=StructNew()> <cfset inputStruct.Doc0="Title.pdf"> <cfset inputStruct.Doc1="Chap1.pdf"> <cfset inputStruct.Doc2="Chap2.pdf"> <cfset inputStruct.Doc3="Chap3.pdf"> <cfset inputStruct.Doc4="Chap4.pdf"> <cfset outputStruct=StructNew()> <cfset outputStruct.Out1="myBook.pdf"> <cfpdf action="processddx" ddxfile="book.ddx" inputfiles="#inputStruct#" outputfiles="#outputStruct#" name="ddxVar"> <cfoutput>#ddxVar.Out1#</cfoutput> </cfif> |
code does not include password verification. ---> <h3>Tax Login Form</h3> <p>Please enter your user name and your social security number.</p> <cfform name="loginform" action="TaxFile2.cfm" method="post"> <table> <tr> <td>User name:</td> <td><cfinput type="text" name="username" required="yes" message="A user name is required."></td> </tr> <tr> <td>SSN#:</td> <td><cfinput type="text" name="SS1" maxLength="3" size="3" required="yes" mask="999"> - <cfinput type="text" name="SS2" maxLength="2" size="2" required="yes" mask="99"> - <cfinput type="text" name="SS3" maxLength="4" size="4" required="yes" mask="9999"></td> </tr> </table> <br/> <cfinput type="submit" name="submit" value="Submit"> </cfform> |
user name entered on the login page. ---> <cfquery name="getEmpInfo" datasource="cfdocexamples"> SELECT * FROM EMPLOYEES WHERE EMAIL = <cfqueryparam value="#FORM.username#"> </cfquery> <h3>Choose a tax form</h3> <p>Hello <cfoutput>#getEmpInfo.firstname#</cfoutput>,</p> <p>Please choose a tax form from the list:</p> <!--- Create a pop-up menu with a list of tax forms. ---> <cfset thisPath=ExpandPath(".")> <!--- Create a variable called filerID that is a combination of the username and the last three digits of the Social Security number. ---> <cfset filerID="#form.username#_#form.SS3#"> <cfdirectory action="list" name="taxForms" directory="#thisPath#/taxforms"> <cfform name="taxList" method="post" action="TaxFile3.cfm"> <cfselect query="taxForms" value="name" size="10" required="yes" multiple="no" name="myTaxForm"/> <br/><br/> <cfinput type="Submit" name="OK" label="OK"> <!--- Use hidden fields to pass the first name, last name, and the three parts of the SSN# to the tax form. Also, create a hidden field for the filerID variable. ---> <cfinput type="hidden" name="FirstName" value="#getEmpInfo.FirstName#"> <cfinput type="hidden" name="LastName" value="#getEmpInfo.LastName#"> <cfinput type="hidden" name="Phone" value="#getEmpInfo.Phone#"> <cfinput type="hidden" name="SS1" value="#form.SS1#"> <cfinput type="hidden" name="SS2" value="#form.SS2#"> <cfinput type="hidden" name="SS3" value="#form.SS3#"> <cfinput type="hidden" name="taxFiler" value="#filerID#"> </cfform> |
information from the database query and the login form. Because no destination is specified, ColdFusion displays the interactive PDF form in the browser. A hidden field in the PDF form contains the name of the output file to write. It is a combination of the user name and the last three numerals of the user SSN#. The submit button added to the form created in Acrobat contains a URL to the ColdFusion processing page. ---> <cfpdfform source="taxForms/#form.myTaxForm#" action="populate"> <cfif "taxForms/#form.myTaxForm#" is "taxForms/f1040.pdf"> <cfpdfformparam name="f1_04(0)" value="#form.Firstname#"> <cfpdfformparam name="f1_05(0)" value="#form.Lastname#"> <cfpdfformparam name="f2_115(0)" value="#form.Phone#"> <cfpdfformparam name="f1_06(0)" value="#form.SS1#"> <cfpdfformparam name="f1_07(0)" value="#form.SS2#"> <cfpdfformparam name="f1_08(0)" value="#form.SS3#"> <cfpdfformparam name="filerID" value="#form.taxFiler#_1040"> <cfelseif "taxForms/#form.myTaxForm#" is "taxForms/f1040ez.pdf"> <cfpdfformparam name="f1_001(0)" value="#form.Firstname#"> <cfpdfformparam name="f1_002(0)" value="#form.Lastname#"> <cfpdfformparam name="f1_070(0)" value="#form.Phone#"> <cfpdfformparam name="f1_003(0)" value="#form.SS1#"> <cfpdfformparam name="f1_004(0)" value="#form.SS2#"> <cfpdfformparam name="f1_005(0)" value="#form.SS3#"> <cfpdfformparam name="filerID" value="#form.taxFiler#_1040ez"> </cfif> </cfpdfform> |
<DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd"> <PDF result="Out1"> <PDF source="Doc1"> <Watermark rotation="30" opacity="65%"> <StyledText><p font-size="85pt" font-weight="bold" color="gray" font="Arial">FINAL</p></StyledText> </Watermark> </PDF> </PDF> </DDX> <!--- The following code reads the PDF file submitted in binary format and generates a result structure called fields. The cfpdfform populate action and the cfoutput tags reference the fields in the structure. ---> <cfpdfform source="#PDF.content#" action="read" result="fields"/> <cfpdfform action="populate" source="#PDF.content#" destination="FiledForms\#fields.filerID#.pdf" overwrite="yes"/> <!--- The following code verifies that the DDX file exists and the DDX instructions are valid. ---> <cfif IsDDX("watermark.ddx")> <!--- The following code uses the processddx action of the cfpdf tag to create a text- string watermark. ---> <!--- This code creates a structure for the input files. ---> <cfset inputStruct=StructNew()> <cfset inputStruct.Doc1="FiledForms\#fields.filerID#.pdf"> <!--- This code creates a structure for the output file. ---> <cfset outputStruct=StructNew()> <cfset outputStruct.Out1="FiledForms\#fields.filerID#.pdf"> <!--- This code processes the DDX instructions and applies the watermark to the form. ---> <cfpdf action="processddx" ddxfile="watermark.ddx" inputfiles="#inputStruct#" outputfiles="#outputStruct#" name="Final"> </cfif> <h3>Tax Form Completed</h3> <p>Thank you for filing your tax form on line. Copy this URL to view or download your filed tax form:</p> <cfoutput> <a href="http://localhost:8500/Lion/FiledForms/#fields.filerID#.pdf"> Link to your completed tax form</a> </cfoutput> |