在 Java Applet 中生成/下载文档
我目前有一个财务计算器小程序,可以根据用户的请求生成为用户计算的信息的 PDF。生成后,PDF 将在本地创建,并且 JFileChooser 允许用户将 PDF 移动到他们选择的计算机上的目的地。
JFileChooser 的运行需要证书。我可以做什么来将 PDF 交付给用户,作为 JFileChooser 和签名小程序的替代方案?
I currently have a finance calculator applet that at the users request generates a PDF of the information calculated for the user. When it is generated, the PDF is created locally, and a JFileChooser allows the user to move the PDF to the destination on their machine of their choosing.
A certificate is required for the JFileChooser to run. What can I do to deliver the PDF to the user as an alternative to the JFileChooser and signing the applet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自官方 Java Applet 教程:
查看这个作为示例。
如果您必须坚持使用传统的小程序,则应该对 jar 进行签名,即使这意味着自签名(我认为在这种情况下会显示警告,但用户可以继续)。
From the official Java Applet tutorial:
Check this out as an example.
If you have to stick to traditional applets, you should sign the jar, even if that means self-signing (I think in this case a warning is displayed, but the user can proceed).
使用此方法:
它只会提示用户下载文件或内联查看它
编辑:这仅在服务器生成 PDF 而不是客户端小程序时有用
Use this method:
It would just prompt the user to download the file or view it inline
EDIT: This is only useful if the Server is generating the PDF and not the Client Applet