相关疑难解决方法(0)

ColdFusion CFPDFFORM不会填充PDF表单字段

我创建了一个带有两个表单字段的快速PDF文件,名字和姓氏(或FirstName和LastName),带有"提交"按钮,并使用以下代码尝试在新的PDF文件中填充这些字段:

<cfpdfform action="populate" source="#variables.AbsPath#\test.pdf">
    <cfpdfformparam name="FirstName" value="foo" />
    <cfpdfformparam name="LastName" value="bar" />
</cfpdfform>
Run Code Online (Sandbox Code Playgroud)

但是,我收到此错误:

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.
Platform, Locale, and Platform Name must not be null
Run Code Online (Sandbox Code Playgroud)

我尝试阅读PDF文件,以确保使用此表单字段是正确的,它们是:

<cfpdfform action="read" source="#variables.AbsPath#\test.pdf" result="fields" />

<cfdump var="#fields#">
Run Code Online (Sandbox Code Playgroud)

结构转出:

FirstName:  [empty string]
LastName:   [empty string]
Submit:     [empty string]
Run Code Online (Sandbox Code Playgroud)

我尝试搜索Adobe文档和其他一些网站,但无法找到此错误的解决方案.我还尝试在cfpdfform标记中添加"destination"参数以备不时之需,但结果相同.PDF文件确实存在.有任何想法吗?提前致谢.

更新:这是堆栈跟踪:

java.lang.NullPointerException: Platform, Locale, and Platform Name …
Run Code Online (Sandbox Code Playgroud)

pdf coldfusion cfpdfform

2
推荐指数
1
解决办法
2423
查看次数

标签 统计

cfpdfform ×1

coldfusion ×1

pdf ×1