House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Merging of PDFs

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Priya Koya
01/06/2009 09:13 AM

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..?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Priya Koya
01/06/2009 10:58 AM

----- 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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Priya Koya
01/06/2009 10:59 AM

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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Raymond Camden
01/06/2009 11:11 AM

> 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.


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference