iTextSharp:PDF中的Javascript在vb.Net中填写时不会触发 [英] iTextSharp: Javascript in PDF not firing when filled in in vb.Net

查看:152
本文介绍了iTextSharp:PDF中的Javascript在vb.Net中填写时不会触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用iTextSharp填写PDF服务器端并返回它,以便客户端可以下载它。

I use iTextSharp to fill in the PDF server-sided and return it so that the client can download it.

这是链接到pdf。

问题是数字1.如果您选中了其中一​​个框,则只能填写PDF。如果没有选中,则一切都将为空。内容未被删除,并且一旦选中框就会返回。

The problem is number 1. You can only fill in the PDF if you have one of the boxes checked. If none is checked, everything will be "empty". The content isn't removed and returns once a box has been checked.

所有内容都已填充,但存在问题。复选框被选中,但它背后的Javascript不会触发。任何解决方案?

Everything gets populated, but there is a problem. The checkbox gets checked, but the Javascript behind it doesn't fire. Any solutions?

推荐答案

当您使用iText(夏普)填写表格时,Javascript事件将不会被触发。

When you use iText(Sharp) to fill in forms, Javascript events wont be triggered.

许多事件都没有意义,没有焦点获得或丢失,没有键入键,iText(夏普)直接更改PDF对象,它不会模拟填写表单的人。

Many events make no sense, no focus is gained or lost, no keys are typed, iText(Sharp) directly changes the PDF objects, it does not emulate a person filling in the forms.

此外,iText(夏普)不包含带有Adobe Reader对象模型的JavaScript执行环境。

Furthermore, iText(Sharp) does not include a JavaScript execution environment with an Adobe Reader object model to begin with.


任何解决方案?

Any solutions?

我写的时候以上,@ Bruno在评论中已经解释过你可以

While I wrote the above, @Bruno already explained in a comment that you can either


  • 投票以获得iText路线图上的某种Javascript支持您是付费iText客户;

  • 等待并希望iText客户的其他iText用户如果您不是付费的iText客户则将其投票到路线图上;

  • 在iT中实现这样的Javascript支持鼓励自己;毕竟它是开源的;但要注意病毒的iText许可证;或

  • 将PDF中的Javascript和硬编码类似操作分析到您的代码中

  • vote to get some kind of Javascript support on the roadmap of iText if you are a paying iText customer;
  • wait and hope other iText users who are iText customers vote that onto the roadmap if you are not a paying iText customer;
  • implement such a Javascript support into iText yourself; it's open source after all; but be aware of the viral iText license; or
  • analyze the Javascript in your PDF and hard code analogous operations into your code

这篇关于iTextSharp:PDF中的Javascript在vb.Net中填写时不会触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆