2017-05-18 1 views
0

나는 pdf 첨부 파일을 만드는 링크가 있습니다.워터 마크 추가 PDF 첨부 파일로 이미지

<a href="filename.cfm?id=#id#" target="_blank">create pdf attachment</a> 

첨부 된 PDF 파일을 만들고 pdf의 중간에 워터 마크 이미지를 추가하고 싶습니다. filename.cfm 파일

<cfsetting enablecfoutputonly="true"> 
<cfcontent type="application/pdf"> 
<cfheader name="Content-Disposition" value="attachment;filename=nameoffile.pdf"> 

<cfdocument format="PDF" localurl="yes" 
    marginTop="0.1" marginLeft="0.2" marginRight="0.2" marginBottom="0.1" 
    pageType="custom" pageWidth="8.5" pageHeight="10.2"> 

    ...pdf content... 
</cfdocument> 

답변

1

당신은 cfpdf 태그를 사용하여 봤어? 그 중 하나는 PDF 문서에 워터 마크를 추가하는 것입니다.

From the docs here

다음 source 속성이 cfdocument 변수가 될 수 있다는

Add a watermark to a PDF document 

<cfpdf 
required: 
    action = "addwatermark" 
    source = "absolute or relative pathname to a PDF file|PDF document variable|cfdocument variable" 
one of the following: 
    copyfrom = "absolute or relative pathname to a PDF file from which the first page is used as a watermark" 
    image = "absolute or relative pathname to image file|image variable used as a watermark" 
optional: 
    foreground = "yes|no" 
    isBase64 = "yes|no" 
    opacity = "watermark opacity" 
    overwrite = "yes|no" 
    pages = "page or pages to add the watermark" 
    password = "user or owner password for the PDF source file" 
    position = "position on the page where the watermark is placed" 
    rotation = "degree of rotation of the watermark" 
    showonprint = "yes|no"> 

알 수 있습니다.