使用 Winform 应用程序填写 PDF/表单 [英] Filling out a PDF / form using Winform application

查看:38
本文介绍了使用 Winform 应用程序填写 PDF/表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 2 页的 PDF,我想使用 C#/.NET Windows 应用程序在上面叠加信息(想想某人手动填写的表单).生成此表单后,需要对其进行预览和打印(导出为图形或 PDF 很好,但不是必需的).

I have a 2-page PDF that I want to overlay information on (think of a form that someone manually fills out) using a C#/.NET Windows application. After this form is generated, it will need to be previewed and printed (exported into a graphic or PDF is nice, but not a requirement).

乍一看,我想到了两种方法来做到这一点:

At first glance, I'm thinking of two ways to do this:

  1. 使用 iTextSharp 等 PDF 操作器,复制空白 PDF 表单,然后将文本添加到 PDF.然后,启动 Adob​​e Reader 进行打印或预览.
  2. 将 PDF 转换为图形,并将图形放入 C# 报告中.然后,将文本字段叠加到报表上,并使用 .NET ReportViewer 控件预览和打印报表.

文本不需要可搜索或可复制,也不需要具有 PDF 给我的任何很酷的东西,所以我倾向于第二种选择.我错过了什么,还是有什么我没有想到的?提前致谢.

The text does not need to be searchable or copyable or have any of the cool things that PDF gives me, so I'm leaning towards the second option. Am I missing anything, or is there something I'm not thinking of? Thanks in advance.

推荐答案

我们广泛使用 #1 并且它完美地工作.您不应该有任何问题,它相当简单(只需要使字段可写并使用 FDF 文件并将其与 PDF 文件合并).至少我们是这样做的.

We use #1 extensively and it works perfectly. You shouldn't have any problems, it's rather easy (just need to make the fields writeable and use a FDF file and merge it with the PDF file). At least that's how we did it.

这篇关于使用 Winform 应用程序填写 PDF/表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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