简体   繁体   English

TCPDF 和 Javascript

[英]TCPDF and Javascript

I've have a pdf generated with TCPDF+XHTML.我有一个用 TCPDF+XHTML 生成的 pdf。 Now I need to use some javascript also.现在我还需要使用一些 javascript。 There are some javascript examples at tcpdf-site, but they aren't relevant for this, but from those examples I've noticed that the javascript has a bit different syntax than I'm used to. tcpdf-site 上有一些 javascript 示例,但它们与此无关,但从这些示例中我注意到 javascript 的语法与我习惯的略有不同。

Basically what I want is to have textfield, and if you type something in it, the text appears at other places too.基本上我想要的是有文本字段,如果你在里面输入一些东西,文本也会出现在其他地方。 But I have no idea how to get events to work with this textfield.但我不知道如何让事件与这个文本字段一起工作。

I do the xhtml output whit $pdf->writeHTML(...) and JS output with $pdf->IncludeJS($js).我用 $pdf->writeHTML(...) 和 JS output 用 $pdf->IncludeJS($js) 做 xhtml output。

IMHO Javascript in PDFs is terribly inconsistent.恕我直言,PDF 中的 Javascript 非常不一致。 Recommend you avoid it unless it's really, really, really necessary.建议您避免使用它,除非它真的非常非常必要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM