Pdf 如何在ColdFusion的封面中添加已批准的图章
我需要一些关于ColdFusion的帮助,我正在尝试创建一个封面,然后在审阅者旁边添加批准的图章。但是,我可以在页面上添加戳记,但不能在审阅者旁边添加戳记。这是ColdFusion代码Pdf 如何在ColdFusion的封面中添加已批准的图章,pdf,coldfusion,cfdocument,cfpdf,Pdf,Coldfusion,Cfdocument,Cfpdf,我需要一些关于ColdFusion的帮助,我正在尝试创建一个封面,然后在审阅者旁边添加批准的图章。但是,我可以在页面上添加戳记,但不能在审阅者旁边添加戳记。这是ColdFusion代码 <cfset sourcefile = "E:\http\docs\psdr\sample.pdf"> <cfset destinationfile = "E:\http\docs\psdr\sample_output.pdf"> <cfse
<cfset sourcefile = "E:\http\docs\psdr\sample.pdf">
<cfset destinationfile = "E:\http\docs\psdr\sample_output.pdf">
<cfset cur_event_date = DateFormat(now(), "mm/dd/yyyy")>
<cfset cur_event_time = TimeFormat(now(), "hh:mm tt")>
<cfset reviewList = "Electrical Engineering Review, Mechanical Engineering Review
, Management Approval">
<cfdocument format="PDF" name="coverPage">
<html>
<body>
<h1>Reviewers Approval</h1>
<table class="table" border="0" cellspacing="2" cellpadding="2">
<thead>
<tr>
<th scope="col">Step</th>
<th scope="col">Action</th>
<th scope="col">Name</th>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Comments</th>
</tr>
</thead>
<tbody>
<cfloop list="#reviewList#" index="reviewers">
<cfoutput>
<tr>
<td>#reviewers#</td>
<td></td>
<td></td>
<td>#cur_event_date#</td>
<td>#cur_event_time#</td>
<td></td>
</tr>
</cfoutput>
<br>
</cfloop>
</tbody>
</table>
</body>
</html>
</cfdocument>
<cfpdf action="addStamp" source="coverPage" overwrite="yes">
<cfpdfparam pages="1" coordinates="397,532,519,564" iconname="Approved"/>
</cfpdf>
<cfpdf action="addStamp" source="#sourcefile#" destination="#destinationfile#" overwrite="yes" >
<cfpdfparam pages="1" coordinates="397,532,519,564" iconname="Approved"
note="on #dateTimeFormat(now(), 'yyyy/mm/dd HH:nn')#"/>
</cfpdf>
<cfpdf action="merge" destination="#destinationfile#" overwrite="yes">
<cfpdfparam source="coverPage">
<cfpdfparam source="#destinationfile#"/>
</cfpdf>
<h1>Add Stamp</h1>
审核人批准
步
行动
名称
日期
时间
评论
#评论员#
#当前事件日期#
#当前事件时间#
加邮票
目前没有使用任何特定HTML的指南/要求,但由于这是一个封面,我需要做的就是创建一个列表并在审阅者旁边添加戳记。我们可以使用网格、表格,任何格式都可以,不管怎样都可以,就像从现有PDF中删除页面,然后使用cfdocument创建一样。谢谢您的建议。我通过在td元素中使用img实现了它。代码在这里
<cfset sourcefile = "E:\http\docs\psdr\sample.pdf">
<cfset destinationfile = "E:\http\docs\psdr\sample_output.pdf">
<cfset cur_event_date = DateFormat(now(), "mm/dd/yyyy")>
<cfset cur_event_time = TimeFormat(now(), "hh:mm tt")>
<cfset reviewList = "Electrical Engineering Review, Mechanical Engineering Review
, Management Approval">
<link rel="stylesheet" type="text/css" href="../util/reportdisplay.css"></link>
<cfdocument format="PDF" name="coverPage" localUrl = "yes">
<html>
<body>
<h1>Reviewers Approval</h1>
<table class="table" border="0" cellspacing="2" cellpadding="2">
<thead>
<tr>
<th scope="col">Step</th>
<th scope="col">Action</th>
<th scope="col">Name</th>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Comments</th>
</tr>
</thead>
<tbody>
<cfloop list="#reviewList#" index="reviewers">
<cfoutput>
<tr>
<td>#reviewers#</td>
<td><img src="https://mesdev.intranet.cnb/e/images/approved_stamp.JPG" width="120" height="38"></td>
<td>Reviewed</td>
<td>#cur_event_date#</td>
<td>#cur_event_time#</td>
<td></td>
</tr>
</cfoutput>
<br>
</cfloop>
</tbody>
</table>
</body>
</html>
</cfdocument>
<cfpdf action="addStamp" source="#sourcefile#" destination="#destinationfile#" overwrite="yes" >
<cfpdfparam pages="1" coordinates="397,532,519,564" iconname="Approved"
note="on #dateTimeFormat(now(), 'yyyy/mm/dd HH:nn')#"/>
</cfpdf>
<cfpdf action="merge" destination="#destinationfile#" overwrite="yes">
<cfpdfparam source="coverPage">
<cfpdfparam source="#destinationfile#"/>
</cfpdf>
审核人批准
步
行动
名称
日期
时间
评论
#评论员#
检验过的
#当前事件日期#
#当前事件时间#
您的代码现在在做什么?向我们展示一个代码正在创建的PDF示例。然后解释该输出是如何不正确的。如果您可以创建一个已批准戳记的图像文件,则可以将其放置在相应的
元素中。