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

Mailing Lists
Home /  Groups /  ColdFusion Eclipse (CFEclipse)

Add Background to PDF

  << 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:
Damo Drumm
08/25/2009 10:22 AM

Hi Im trying to add a background to a PDF, im using the below code but its not putting the picture behind the text its displaying on a second page any tips would be great <cfpdf action="merge"         destination="#request.maindrivePath#temppdf\#pdfname#"         overwrite="yes">   <cfpdfparam source="#request.maindrivePath#testfiles\#qgetinvoice.INVOICE_PDFFile#">   <cfpdfparam source="#request.maindrivePath#templates\#qgettemplate.COMPANY_Template#"> </cfpdf> <cflocation url="temppdf/#pdfname#">

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James White
08/25/2009 10:30 AM

try using the watermark option for the cfpdf tag and using a ddx file.  You use ddx files to create watermarks, header/footer, table of contents, etc. Here's a link to the Adobe site that has a tutorial (with code) on how to manipulate PDF files with cfpdf: http://www.adobe.com/devnet/coldfusion/articles/ddx_pdf.html Hope that helps. JW On Tue, Aug 25, 2009 at 9:26 AM, Damo Drumm <damien.drumm@quinn-group.com>wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James White
08/25/2009 10:37 AM

My bad, that was not totally correct.  Actually you use the watermark tag in the ddx file and you set the cfpdf action attribute to "processddx".  This tells the code to add something to an existing pdf.  here's the section on livedocs that explains everything you can do to manipulate a PDF: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=formsPDF_01.html . --JW ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Damo Drumm
08/25/2009 11:24 AM

Hi James I dont really want to add anything to the PDF, I just want it to display as a background, Ive one PDF and im trying to put an image in the background of it, its not linked in any way to it hope this makes sence Thanks ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Damo Drumm
08/25/2009 11:23 AM

Hi James I dont really want to add anything to the PDF, I just want it to display as a background, Ive one PDF and im trying to put an image in the background of it, its not linked in any way to it hope this makes sence Thanks ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James White
08/25/2009 11:33 AM

So do you want to take a PDF and use it as a background to another PDF, is that what you want to do?  Because if that's the case, I believe you would use the same process using DDX.  Otherwise, if you could explain in bit more detail, I can try and help you. Thanks, James On Tue, Aug 25, 2009 at 10:28 AM, Damo Drumm <damien.drumm@quinn-group.com>wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Damo Drumm
08/26/2009 03:23 AM

Well I have the background saved as both a JPG and a PDF, so if it was easier to put the JPG as a background on the text file which is a PDF I would try that, Hope this is a bit clearer ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James White
08/26/2009 09:25 AM

I think the process works the same, but I'm not 100% certain.  I have only used DDX for adding header and footers to a PDF, but it is my understanding that watermarks work in a similar fashion.  Try the tutorial and read the Livedocs info and that should help some (at least it helped me). Thanks, James On Wed, Aug 26, 2009 at 2:33 AM, Damo Drumm <damien.drumm@quinn-group.com>wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Damo Drumm
08/27/2009 09:20 AM

Thank James I finally got it to work using the below code <cfpdf     action = "addwatermark"     source = "#request.maindrivePath#testfiles\#qgetinvoice.INVOICE_PDFFile#"     image = "templates\TEST.jpg"     foreground = "No"     overwrite = "yes"     pages = "1"     rotation = "0"      showonprint = "YES"     destination = "#request.maindrivePath#temppdf\#pdfname#"> Thanks for your help <cflocation url="temppdf/#pdfname#"> ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James White
08/27/2009 09:34 AM

I am glad u got it working. James On Aug 27, 2009 8:36 AM, "Damo Drumm" <damien.drumm@quinn-group.com> wrote: Thank James I finally got it to work using the below code <cfpdf    action = "addwatermark" source = "#request.maindrivePath#testfiles\#qgetinvoice.INVOICE_PDFFile#"    image = "templates\TEST.jpg"    foreground = "No"    overwrite = "yes"    pages = "1"    rotation = "0"     showonprint = "YES" destination = "#request.maindrivePath#temppdf\#pdfname#"> Thanks for your help <cflocation url="temppdf/#pdfname#"> >I think the process works the same, but I'm not 100% certain. I have only >used DDX for adding hea...


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

Search cfeclipse

June 19, 2013

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

Designer, Developer and mobile workflow conference