2017-05-18 23 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タグを使用して見たことがありますか?オプションの1つは、PDF文書にウォーターマークを追加することです。

From the docs heresource属性は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"> 

注意してください。

関連する問題