0

I have a Issue with docusign attachment through REST API. It was perfectly worked previously but the following error message coming,

{ "errorCode": "UNABLE_TO_CONVERT_DOCUMENT", "message": "System was unable to convert this document to a PDF. Unab (truncated...)

If you can please help me on this

Bellow is the code segment which I'm using for attach image file to the docusign.

if(isset($this->attachments['NIC_Rear'])) {

            array_push($dataArray['compositeTemplates'],
                [
                    'inlineTemplates' => array(
                        [
                            'sequence'  => '3',
                            'recipients' => array(
                                'signers' => array([
                                    'email' => $this->issuerEmail,
                                    'name' => $this->issuerName,
                                    'recipientId' => '1',
                                    'roleName' => $this->roleName,
                                    'tabs' => $this->tabs,
                                ])
                            )
                        ]
                    ),
                    'document' => array('documentId' => '3',
                        'name' => 'Attachment11',
                        'fileExtension' => get_file_extension_from_file($this->attachments['NIC_Rear']),
                        'width' => 100,
                        'height' => 100,
                        'documentBase64' => isset($this->attachments['NIC_Rear']) ? base64_encode($this->attachments['NIC_Rear']) : '',
                    ),
                ]
            );
        }
Malinda Wijekoon
  • 173
  • 1
  • 3
  • 13

1 Answers1

1

This error you're getting: { "errorCode": "UNABLE_TO_CONVERT_DOCUMENT", "message": "System was unable to convert this document to a PDF. Unab (truncated...)

is indicative of any situation where the bits being passed to the DocuSign system cannot be converted into a flat pdf file representing the document. It could be that it's not any document format that is supported, the document is password locked, empty or have any invalid macros or other bad stuff in it. Can you try a simple text document first just to isolate the issue?

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • Yap. I have tried by using separate .jpeg file. and it was succeed. the issue was I'm getting the data and the documents by separated third party service call "type form". Type form host only contains the attached documents. They have added a new security barrier on top that. so the login page of that platform is pointed to convert. – Malinda Wijekoon Aug 16 '19 at 11:39
  • that is tricky scenario. I've seen this before. The DS system cannot authenticate into third party system when the document is converted. You would have to do extra work to get the document yourself before you send it to DocuSign – Inbar Gazit Aug 16 '19 at 16:16
  • sure, you get your document in your application, and save it into a separate document that does not have any links to anything, just a simple .jpef file which you already know works, you send this file to DocuSign, not the original – Inbar Gazit Aug 19 '19 at 15:47