跳到主要内容

PDF表单模板 Make

PDF表单系列 是一个 Make 生成文档:单个选项,用于填充可填写文档的指定字段。 PDF 使用您的数据(一个 AcroForm 表单)并返回已完成的表单 PDF当您需要填写固定布局的监管或政府表格,且无法重新设计时,请选择此选项。 Word 已提供模板,但仍需要自动数据录入。

相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客

开始之前

可填写 PDF 带有命名表单字段
样本 模板.pdf 这是一个带有命名字段的 AcroForm 表单。数据文件中的每个键都映射到一个同名的表单字段;不匹配的字段将保持为空。
匹配数据文件
使用 formdata.json (受到推崇的), 测试.xml, 或者 测试.csv键与表单字段名称一一对应。
PDF4me 连接 Make
创建一个 PDF4me 连接 Make 并粘贴你的 API 密钥。同一个密钥适用于所有…… PDF4me 在您的场景中,该模块。

示例文件包

请下载以下文件。 PDF 表单模板及匹配数据 JSONXML, 和 CSV

使用 PDF4me 的“使用模板生成文档”模块显示连接信息,模板名称设置为 PDF4me 存储库中的示例模板,文档数据类型为 JSON,文档数据文本为空,文档数据文件已从上一步(步骤 2)映射,元数据 JSON 也为空。

目标配置: PDF4me PDF 模板 + 形式 JSON文档数据文本 + PDF 输出。

什么是 PDF 表单模板? Make

PDF表单系列对可填写表单执行表单字段替换操作。 PDF与其使用带有胡子标签的布局,不如…… PDF 它包含已命名的 AcroForm 字段,该模块会将您的数据值写入这些字段。输出结果相同。 PDF 每个匹配字段都已填写,非常适合标准化表格。

如何在PDF中配置表单模板? Make

请按如下方式设置模块字段。必填字段标有红色星号。 Make UI

范围必需的它的作用例子
ConnectionRequiredPDF4me connection for the scenario. Click Add to create one with your API key.My PDF4me connection
Template File TypeRequiredSet to PDF4me PDF Template for this template family.PDF4me PDF Template
Output TypeRequiredFormat of the generated document. PDF is the output for a form-fill template.PDF
Template NameRequiredTemplate file name including extension. Map from the prior module file name output.template.pdf
TemplateRequiredTemplate file binary. Map from the prior module data output (for example 1. Data from Dropbox Download a File).1. Data
Document DataTypeRequiredChoose Json for JSON payloads (most common) or Xml when the upstream system returns XML.Json
Document Data TextConditionalInline JSON or XML data. Use when Document Data File is empty.formdata.json
Document Data FileConditionalMapped data file from a prior module. Use when Document Data Text is empty.1. Data

输出

该模块每次运行返回一个捆绑包。生成的文件放置在…… 文件日期 输出字段。

场地类型它包含什么
Doc DataBinaryThe generated PDF document. Map into a downstream Upload File or Send Email Attachment module.
File NameStringOutput filename based on Template Name with the extension matching Output Type.
Mime TypeStringMIME type of the generated document.

生产模式

PDF 表单模板的常用制作模式Replace the manual test with these once the sample works.
来自云存储的模板
  1. Dropbox 或者 Google Drive 商店 模板.pdf
  2. 下载文件会将模板以二进制形式加载。
  3. 生成文档单张地图模板名称和模板。
  4. 数据由……构建而成 Sheets 或者使用 webhook 作为 JSON
已交付的 Webhook PDF
  1. Webhook 接收记录有效负载。
  2. 生成单个文档会将其与模板合并。
  3. 输出类型为 PDF
  4. 发送电子邮件或上传文件即可发送文档数据。
从数据源批量处理
  1. 搜索记录会返回多行数据。
  2. 迭代器每次循环处理一条记录。
  3. 生成文档:每个记录运行一次。
  4. 每个文件都上传到对应的记录文件夹中。

常见问题解答

How does form filling differ from a Word template?+
A Pdf Form template has named AcroForm fields instead of mustache placeholders. The module writes each data value into the form field of the same name and returns the completed PDF.
What happens to fields with no matching data?+
Unmatched form fields are left blank. Only fields whose names match a key in your data file are filled, so partial data still produces a valid PDF.
Can a Pdf Form template output Word?+
No. Form-fill templates output PDF. If you need an editable document, use a PDF4me Word Template instead.
Which data formats can I use to fill the form?+
Set Document DataType to Json or Xml. The sample pack includes formdata.json, test.xml, and test.csv with the same field values.

相关指南

有关底层模板引擎,请参阅 Aspose Words for .NET 文档 以及 Make 数据结构参考