|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Merging of PDFs
This is to pull the data from stored preocedure.Part 1Priya Koya 01/06/09 09:13 A > This is to pull the data from stored preocedure.Part 1Priya Koya 01/06/09 10:58 A Can any one help me put with this?????Priya Koya 01/06/09 10:59 A Did you see my response?Raymond Camden 01/06/09 04:17 P This is to pull the data from stored preocedure.Part 1 <!--- Store Procedure to get the PDF from the specified Disclosure ID ---> <cfstoredproc procedure="csp_ONF_GetDisclosureData" datasource="Platform" > <cfprocparam cfsqltype="CF_SQL_INTEGER" value="#application.banknumber#" type="in"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#session.get_DisclosureID#" type="in"> <cfprocresult name="Disclosure_Data" > </cfstoredproc> <!--- <cfdump var="#Disclosure_Data#"> ---> <!--- <cffile action="WRITE" file="C:\temp.pdf" output="#ToString(Disclosure_Data.DocumentData)#"> ---> <cffile action="WRITE" file="C:\temp.pdf" output="#toString(Disclosure_Data.DocumentData)#"/> <!--- <cffile action="readbinary" file="C:\temp.pdf" variable="pdf_read"/> <cffile action="WRITE" file="C:\temp.pdf" output="#get_PDF#"/> ---> <cfset session.data_pdf=#ToString(Disclosure_Data.DocumentData)#> <cfcontent file = "C:\temp.pdf" deleteFile = "no"> <!--- <cfheader name="temp_PDF" value="inline; filename=temp1.pdf"> ---> </body> </html> This file displays the data pulled from the Database using stored Procedues.Part 2 <cfform action="confirmation.cfm"> <cfoutput query="Disclosure_results" group="Name"> <b>#Disclosure_results.Name# </b><br> <br> <cfinput type="checkbox" name="cbx_text" value="value_text" required="yes" message="Please accept Disclosure"> #Disclosure_results.displaytext# <br><br> <cfif #Disclosure_results.DocumentAvailable# eq '1'> <cfset session.get_DisclosureID=#Disclosure_results.DisclosureID#> <cfinput type="checkbox" name="cbx_pdf" value="value_pdfhyper" required="yes" message="Please accept Disclosure"> <a href="getPDF.cfm">Please Click </a><br><br> </cfif> Now my problem is to merge the Part1 PDF generated in the browser and Part2 (text pulled out from databaseand also have sme form data and I saved in some file which is also to be merged in to single PDF file I am unable to merge using cfpdf. But I cannot even use cfpdf as it can store the file in some location and not opens in browser. Please help me out in merging the contents of the formData, PDF generated in browser (Part1) and the data in the webpage pulled from Database (Part 2.) and saving it in some temp file so that I again save that PDF file in the Database using stored Procedure and also display in the browser. This is my code to save as well as display in the browser. <cfsavecontent variable="data"> <cfoutput> <strong> Confirmation </strong> <table width="500" border="0" align="center"> <tr> </tr> <tr> <td>FirstName</td> <td>#session.F_name#</td> </tr> <tr> <td>M.Initial</td> <td>#session.M_initial#</td> </tr> <tr> <td>LastName</td> <td>#session.L_name#</td> </tr> <tr> <td>Address</td> <td>#session.Add1# #session.Add2#</td> <tr> <td></td> <td>#session.City_name# #session.State_Name# #session.Zip_Name# </td> <tr> </tr> <tr> <td>TIN</td> <td>#session.TIN_number#</td> </tr> <tr> <td>DOB</td> <td>#session.DOB#</td> </tr> <tr> <td>E-mail</td> <td>#session.email#</td> </tr> <tr> <td>Phone</td> <td>#session.Phone#</td> </tr> <br> <br> </table> <p> </cfoutput> </cfsavecontent> <!--- to generate file in any folder---> <cfdocument format="pdf" overwrite="yes" name="info_pdf" filename="C:\my.pdf"> <!--- <cfdocumentitem type="header"> <font>Header</font> </cfdocumentitem> <cfdocumentitem type="footer"> <font>Footer</font> </cfdocumentitem> ---> <cfoutput>#data#</cfoutput> <cfdocumentitem type="pagebreak"/> <table align="center"> <tr> <td> <div align="center"> Disclosures: <cfoutput query="session.Disclosure_results" group="Name"> </div> <br> <b>#session.Disclosure_results.name#</b> <br> #session.Disclosure_results.displaytext# <br> </td> </tr> </table> </cfoutput> </cfdocument> <!--- showing the pdf in window---> <cfdocument format="pdf" overwrite="yes"> <cfoutput>#data#</cfoutput> <cfdocumentitem type="pagebreak"/> <table align="center"> <tr> <td> <div align="center"> Disclosures: <cfoutput query="session.Disclosure_results" group="Name"> </div> <br> <p><font size=2><b>#session.Disclosure_results.name#:</b></font> </p> <p> #session.Disclosure_results.displaytext# </p><br> </td> </tr> </table> </cfoutput> </cfdocument> Please can anyone help me out with this..? ----- Excess quoted text cut - see Original Post for more ----- > <cfoutput> > > <strong> Confirmation </strong> > <table width="500" border="0" align="center"> > <tr> </tr> > <tr> > <td>FirstName</td> > <td>#session.F_name#</td> > </tr> > <tr> > <td>M.Initial</td> > <td>#session.M_initial#</td> > </tr> > <tr> > <td>LastName</td> > <td>#session.L_name#</td> > </tr> > <tr> > <td>Address</td> > <td>#session.Add1# #session.Add2#</td> > <tr> > <td></td> > <td>#session.City_name# #session.State_Name# > #session.Zip_Name# </td> > <tr> </tr> > <tr> > <td>TIN</td> > <td>#session.TIN_number#</td> > </tr> > <tr> > <td>DOB</td> > <td>#session.DOB#</td> > </tr> > <tr> > <td>E-mail</td> > <td>#session.email#</td> > </tr> > <tr> > <td>Phone</td> > <td>#session.Phone#</td> > </tr> > > <br> > <br> > > </table> > <p> ----- Excess quoted text cut - see Original Post for more ----- > <cfdocumentitem type="footer"> <font>Footer</font> </cfdocumentitem> > ---> > <cfoutput>#data#</cfoutput> > <cfdocumentitem type="pagebreak"/> > <table align="center"> > <tr> > <td> > <div align="center"> > Disclosures: > <cfoutput query="session.Disclosure_results" group="Name"> > </div> > <br> > <b>#session.Disclosure_results.name#</b> > <br> > #session.Disclosure_results.displaytext# <br> > > </td> > </tr> > </table> ----- Excess quoted text cut - see Original Post for more ----- > <cfoutput>#data#</cfoutput> > <cfdocumentitem type="pagebreak"/> > <table align="center"> > <tr> > <td> > <div align="center"> > Disclosures: > <cfoutput query="session.Disclosure_results" group="Name"> > </div> > <br> > <p><font size=2><b>#session.Disclosure_results.name#:</b></font> > </p> > <p> #session.Disclosure_results.displaytext# </p><br> > </td> > </tr> > </table> > ----- Excess quoted text cut - see Original Post for more ----- Can any one help me put with this????? ----- Excess quoted text cut - see Original Post for more ----- > <cfoutput> > > <strong> Confirmation </strong> > <table width="500" border="0" align="center"> > <tr> </tr> > <tr> > <td>FirstName</td> > <td>#session.F_name#</td> > </tr> > <tr> > <td>M.Initial</td> > <td>#session.M_initial#</td> > </tr> > <tr> > <td>LastName</td> > <td>#session.L_name#</td> > </tr> > <tr> > <td>Address</td> > <td>#session.Add1# #session.Add2#</td> > <tr> > <td></td> > <td>#session.City_name# #session.State_Name# > #session.Zip_Name# </td> > <tr> </tr> > <tr> > <td>TIN</td> > <td>#session.TIN_number#</td> > </tr> > <tr> > <td>DOB</td> > <td>#session.DOB#</td> > </tr> > <tr> > <td>E-mail</td> > <td>#session.email#</td> > </tr> > <tr> > <td>Phone</td> > <td>#session.Phone#</td> > </tr> > > <br> > <br> > > </table> > <p> ----- Excess quoted text cut - see Original Post for more ----- > <cfdocumentitem type="footer"> <font>Footer</font> </cfdocumentitem> > ---> > <cfoutput>#data#</cfoutput> > <cfdocumentitem type="pagebreak"/> > <table align="center"> > <tr> > <td> > <div align="center"> > Disclosures: > <cfoutput query="session.Disclosure_results" group="Name"> > </div> > <br> > <b>#session.Disclosure_results.name#</b> > <br> > #session.Disclosure_results.displaytext# <br> > > </td> > </tr> > </table> ----- Excess quoted text cut - see Original Post for more ----- > <cfoutput>#data#</cfoutput> > <cfdocumentitem type="pagebreak"/> > <table align="center"> > <tr> > <td> > <div align="center"> > Disclosures: > <cfoutput query="session.Disclosure_results" group="Name"> > </div> > <br> > <p><font size=2><b>#session.Disclosure_results.name#:</b></font> > </p> > <p> #session.Disclosure_results.displaytext# </p><br> > </td> > </tr> > </table> > ----- Excess quoted text cut - see Original Post for more ----- Did you see my response? ----- Excess quoted text cut - see Original Post for more ----- > Now my problem is to merge the Part1 PDF generated in the browser and Part2 (text pulled out from databaseand also have sme form data and I saved in some file which is also to be merged in to single PDF file I am unable to merge using cfpdf. But I cannot even use cfpdf as it can store the file in some location and not opens in browser. I'm sorry - but why can't you use cfpdf? You could simply store the second PDF into a temporary file location then merge the two, then you can easily serve up the result.
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||