1

我正在尝试在可填写的pdf上使用docusign进行电子签名,但是当我填写pdf表格然后使用docusign_rest gem将其发送到docusign时,它显示无法填写的pdf。

所以我想要实现的是用用户在运行时提供的数据保存可填充的 pdf。

有没有一种方法可以在线保存和签署可填写的 pdf,而无需通过 DocuSign 或其他一些实用程序下载它?

4

1 回答 1

0

Alright I did a couple of tests for you. #1 I just used the DocuSign web app and uploaded the PDF that had a filled data field. In that case you get the data in the field and the field converted as "SecureFields" and the data was there.

To preserve the fields on the PDF you need to treat the PDF as a template. Here is the JSON (sparing you of PDF bytes) to get the fillable PDF going. I have not tried it myself yet so not 100% sure if it will work for you.

In terms of how the ruby gem works I suggest you contact the author to make sure things get passed to DocuSign API in the proper format.

Use case: A user would like to create an envelope from a document that contains PDF Form Fields that they would like transformed to DocuSign Tabs.

--------------------------------------------------------------
POST http://localhost/restapi/v2/accounts/1173/envelopes
X-DocuSign-Authentication: <DocuSignCredentials><Username>.....</Username><Password>password</Password><IntegratorKey>DOCU-......</IntegratorKey></DocuSignCredentials]]>
Accept: application/json
Content-Type: multipart/form-data; boundary=AAA

--AAA
Content-Type: application/json
Content-Disposition: form-data

{
  "compositeTemplates": [
    {
      "inlineTemplates": [
        {
          "sequence": 1,
          "recipients": {
            "signers": [
              {
                "email": "tester@tester.com",
                "name": "Joe Doe",
                "recipientId": "1",
                "defaultRecipient": true
              }
            ]
          }
        }
      ],
      "document": {
        "documentId": 1,
        "name": "ElectronicPaymentAuth.pdf",
        "transformPdfFields": true
      }
    }
  ]
}

--AAA
Content-Type: application/pdf
Content-Disposition: file; filename="ElectronicPaymentAuth.pdf"; documentid=1

<DOCUMENT BYTES OMITTED>

--AAA--

Exact log of the call with PDF bytes is here: https://docs.google.com/file/d/0B32XZbrBkDXxRXNMN2trRXRVZFE/edit?usp=sharing

于 2013-07-19T23:59:37.507 回答