cfpdf watermark issue
All,
I'm having a problem when adding a watermark to a pdf document. Here is the sample code below:
<!--- Merge 2 documents together --->
<cfpdf
action="merge"
source="test.pdf, test2.pdf"
destination="merged.pdf"
overwrite="yes">
<!--- Add text watermark to the newly merged pdf --->
<cfpdf
action="addwatermark"
text="Hello"
source="merged.pdf"
overwrite="yes"
foreground="yes"
destination="watermark.pdf">
<!--- Output file to user and then delete --->
<cfcontent
file="http://WEB-ADDRESS/watermark.pdf"
type="application/pdf"
deletefile="yes">
The files merge together properly and the text watermark is added successfully. However, when I change the watermark to something like, "Hello1", save, then hit the back button in the browser and try to merge again, it still shows, "Hello", and not "Hello1". If I close the browser down, and reopen, then "Hello1" properly shows.
Seems like it's storing this in cache somehow. As shown in the code above, I tried adding the 'deletefile="yes"' to the <cfcontent> tag, but it is not deleting the file after displaying to the user (I checked the folder location). Also, I've tried adding, "<cfcache action="flush">" to the top of my page, but no success either.
Can you guys think of any other way to delete this file, or some other solution?
Thanks for the help.
