【问题标题】:Why isn't pdffiller checking my PDF checkbox?为什么 pdffiller 不检查我的 PDF 复选框?
【发布时间】:2020-02-27 22:17:27
【问题描述】:

我们正在使用 npm 包 pdffiller 用我们的数据填充 PDF。在 1 个 PDF 上,我们将复选框的导出值设置为“是”,并且它可以很好地选中这些框。另一方面,我们也做了同样的事情,但它没有选中这些框。

我附上 PDF。请注意,我们只测试几个复选框开始。请参阅第 1 页申请人信息下名为 business.entityType.LLC 的字段(LLC 选项)。我们已经对此进行了一些测试,但这是一个简单的示例。

https://joncorrin.s3-us-west-2.amazonaws.com/Acord_125.pdf

这是我们传递给 pdffiller 的对象示例,其中 Yes 作为数据值(这应该会导致检查)

{
  'business.entityType.LLC': 'Yes',
  'business.businessType.Service': 'Yes',
  'business.entityStartDate': '09/01/2017',
  'business.isOtherEntity': 'No',
  'business.hasOtherSubsidiaries': 'No',
  'business.hasSafetyProgram': 'No',
  'business.buildingHasDangerousMaterial': 'No',
  'business.hasOtherInsuranceWithCompany': 'No',
  'business.hasCancelled': 'No',
  'business.hasHadMisconductClaims': 'No',
  'business.hasBeenConvicted': 'No',
  'business.hasSafetyViolations': 'No',
  'business.hadBankruptcy': 'No',
  'business.hadLien': 'No',
  'business.hasTrust': 'No',
  'business.hasForeignOperations': 'No',
  'business.hasOtherVentures': 'No'
}

这是我们创建对象后pdffiller代码的核心

// actual code:
await pdfFiller.fillForm(filePath, filledPdfFilePath, filledObj, async (pdfErr) => {
            if (pdfErr) return next(Boom.badRequest(pdfErr));
            const streamBuffer = await fs.readFileSync(filledPdfFilePath);
            await fs.unlinkSync(filePath);
            await fs.unlinkSync(filledPdfFilePath);
            res.send(Buffer.from(streamBuffer, 'binary'));
          });

【问题讨论】:

    标签: javascript node.js forms pdf fdf


    【解决方案1】:

    我相信我的问题是整个 PDF 或只是复选框字段被锁定。奇怪的是,除了复选框字段之外,所有字段都在填写。当我通过此软件运行 PDF -> https://smallpdf.com/ 以解锁 PDF 时,复选框开始检查。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-11
      • 1970-01-01
      • 1970-01-01
      • 2022-07-07
      • 1970-01-01
      • 2021-12-04
      相关资源
      最近更新 更多