srikanthsrigir…

"messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Team, I am trying create a package with pdf document part of package. I am getting below Error. {"messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message":"Could not upload PDF document: it contains a syntax error preventing proper processing of its data.","code":400,"name":"Validation Error"} The PDF File i am using has PDF FORM Sigature Fields which were prepared by XML/SOAP based silanis Integration module. I have created Approval block with field to Extract existing Signature Blocks in PDF Form. I expected the PDF Form will Signature blocks are retained and allow the user to sign. " \"fields\": [\r\n" + " {\r\n" + " \"type\": \"SIGNATURE\",\r\n" + " \"extract\": true,\r\n" + " \"subtype\": \"CAPTURE\",\r\n" + " \"binding\": \"{approval.signed}\",\r\n" + " \"value\": \"Srikanth\"," + " \"name\": \"001signature\"\r\n" + " }\r\n" + Also for signature block, how to show the Name of the person on the signature Block instead of Click to Sign without any name on the block. Any pointers would be of great help.Thanks in Advance. Regards, Srikanth Srigiri.

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
As per the error message you've been getting, there seems to be an issue with your PDF document. Would you be able to share your document so I can have a look at it? Please make sure to remove any sensitive data. And to answer your other question, you will need to change the subtype to "FULLNAME" instead of "CAPTURE".
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi, I am also getting this error, and it's a new error as far as I can tell. PDF generating code that always worked has recently started giving this error. The production system does not have this bug as far as I can tell, only Sandbox. I have attached a sample of the PDFs that are failing. It is interesting to note, that all searches for this error message in this forum, yield search results for messages that were posted in the last 10 days. Perhaps a new bug introduced to sandbox environment?

Attachments
latex.pdf91.06 KB

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Jonah, The error message that I am getting is the following: "This document has the \"NeedAppearances\" flag set. This has negative implications concerning the security of the signatures, and cannot be accepted." Can you trying removing this flag from your PDF generating code and see if it works?
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Thanks for the help! And sorry, I uploaded the PDF before our pre-processing took care of that issue! Here is the file right before upload.

Attachments
out.pdf87.4 KB

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Haris, have you had a moment to take a peak at my second document upload? Did you have any luck with it?

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Yes, I will look into it shortly.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
It is indeed a strange behavior where it does seem to work on production but not on sandbox. This will require more investigation on my end. I will post back here when I get an update.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
I created a support ticket for you. I will post back when I get an update from them.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Thanks for your help Haris

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Btw, I've tried deleting the form fields from the PDF and it seemed to have solved the issue. I'm not entirely why this is the case. Are you going to be extracting the form fields from the PDF to position signatures and fields?
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Harris, I use an open source C# library (PdfSharp) to detect where are the fields are located myself. I then send this information to eSignLive manually. In our current Production environment, this works perfectly. Below is the code I use in case you are curious: Edit: adding gist link instead of code: https://gist.github.com/anonymous/c4efb7a355f4b080b901a5efbaabed03

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

1 votes
I did some more testing on my end and it seems that our doc engine is conflicting with the three signature form fields (see attachment). Since you're only using the form fields to detect the position using an external library, what I can suggest as a temporary workaround is to change those signatures fields to textfields in your pdf. When I did that, the upload worked fine.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
attachment
Haris Haidary OneSpan Technical Consultant

Attachments

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, I tested with your suggestion and was able to get all the way through our workflow successfully (attached is signed file). I appreciate your assistance.

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Glad you got it working :)
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, Attached is the file for which I am facing is issue. Thanks in Advance. Regards, Srikanth Srigiri.

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Can you try with the suggestion I made in my previous reply?
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, Do you want to me to try the recommendation of removing "NeedAppearances" flag. Please note the PDF file is generated by other module and believe that we have any control to say/modify the way PDF to be generated. Also , the same PDF is working fine with SOAP based Implementation. Thanks, Srikanth Srigiri.

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
No, the suggestion I made to jtassie where he changed the signatures fields in his PDF to textfields.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, Please note that the PDF file is generated by another module and I would not be able to modify the contents of PDF. Thanks, Srikanth

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
If you open your pdf with Adobe Reader and head over to the document properties, you see that "Document Assembly" and "Page Extraction" are not allowed. rest In the "Document Restrictions Summary", everything should be set to allowed to avoid any issues uploading documents to esignlive. Therefore, you will have to make changes in how your pdf is generated.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, I have another document using which I could create a package and upload the PDF for signing. This PDF file has same "Document Restrictions" as pointed by you in failed upload PDF case. Kindly look into this. Thanks in advance. Regards, Srikanth Srigiri.

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Doing a preflight validation, there seems to be syntax errors on both documents (the original one with the could not be flattened error and your latest one). I'm not sure why one uploads and the other doesn't but I was able to resolve your original issue by creating a new PDF from Adobe. In other words, in Adobe Acrobat, File > Print > Save as PDF.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, Thanks for your response and suggestions. Is there any specific version of Adobe Acrobat you are refering to?. I did not find any "Save as PDF" option while trying to reprint as per your suggestion. Also, since the error is validated at Silanis side, I need to know why one document is failed while the other one worked with same Document Properties. Can you please run some testing using the PDFs shared and let me know if you can find any differences with the two PDF files Regards, Srikanth Srigiri.

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Srikanth, Both of your documents contain syntax errors and this is likely why you are not able to upload your original document. Granted, I'm not sure why you're able to upload the second document. You most likely lucked out on that one. Now, I can put in a request for this to find out why it is happening on our side but this process is going to take at least a couple of weeks since our R&D team is overwhelmed with high priority issues. The easiest way to fix your issue would be to install Adobe Acrobat DC (not Adobe Acrobat Reader DC) and print a new PDF as I suggested above.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Harish, I am also facing this problem when trying to upload a pdf with new signature field added to it. attached for reference. If you could let know what causing this failure. PDF: Attached Its unlocked, new 5 signatures added in last page (Existing 1st signature works ) Error: { "messageKey": "error.validation.verifyDocument.couldNotBeFlattened", "message": "Could not upload PDF document: it contains a syntax error preventing proper processing of its data.", "code": 400, "name": "Validation Error" }

Attachments

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Permenders, I have no issues uploading the document you provided. Are you sure it is the correct one?
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
yes.. same document is giving me this issue. Just tried even after downloading copy attached in previous post

Attachments
error.jpg67.01 KB

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Can you share your json payload? If you don't want share it here in the forums, you can send it to me at [email protected]
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Permenders, You have the following form field names in your PDF: 001Signature 002AgencySignature 003MulvaniaSignature 004MulvaniaSignature 005MulvaniaSignature 006PotterSignature But in your JSON payload, you are trying to extract the following form field names: 001Signature (fine) 002Signature (non-existent in your PDF) 003Signature (non-existent in your PDF) 004Signature (non-existent in your PDF) Please modify your JSON payload so that it matches the names in your PDF. As you said, when you tried with one signature (i.e. 001Signature), it works. Because eSignLive was able to find that form field in your PDF. Also, I also noticed some typos in your payload, such as "Date:", which doesn't exist in your PDF. You should be able to upload your PDF fine after you've addressed these issues.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Thanks Haris.. it worked.. So it means whatever number of signatures (anchor) are instructed by JSON should be present.. however is it same vice versa (if less instructed in JSON and more present)?

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Yes.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, Do you have an update on what the possible reason for errror "error.validation.verifyDocument.couldNotBeFlattened"?. Also I am facing this error using attached Pdf. I am attaching two PDFs (FailedPDF.pdf , WorkedPDF.pdf) , out which one worked fine and the other failed. Note that FailedPDF.pdf is created out of WorkedPDF.pdf. Also JSON Payload is same for both PDFs except that the workedPDF.pdf has 7 pages and failedPDF.pdf has 3 pages. kindly take a look at these file and point me with difference which may help to understand the couldNotBeFlattened Error and prepare the PDF accordingly. Thanks in Advance. Regards, Srikanth

Attachments

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, Just to add the issue i listed above, I have updated the logic of creating PDF file ( FailedPDF.pdf) and now i see that pdf is sent to Silanis without error. But upon Email notification, I see the Signature blocks are not getting Extracted. Also as mentioned above, FailedPDF. pdf( 7 pages ) is sub document of WorkedPDF(3 pages) and both PDFs have same number of signature blocks. so JSON payload is identical in both cases. Please point out the difference and which may help to fix the issue with FailedPDF Regards, Srikanth Srigiri.

Attachments

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Do you mind sharing your json payload so I can run some tests?
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Also, your document "FailedPDF-1" doesn't have any form fields. I suggest you might add those in your PDF before trying to extract signatures.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Haris, Below is the JSON pay load for FailedPDF.pdf shared before. { "roles": [{ "id": "signer2", "type": "SIGNER", "name": "signer2", "signers": [{ "firstName": "Anurag", "lastName": ",", "phone": "12345", "email": "[email protected]", "company": "Oracle", "delivery": { "email": true, "provider": true, "download": true } }] }, { "id": "signer1", "type": "SIGNER", "name": "signer1", "signers": [{ "firstName": "SRIKANTH SRIGIRI SRIGIRI", "lastName": ",", "phone": "7406888787", "email": "[email protected]", "company": "Oracle", "delivery": { "email": true, "provider": true, "download": true } }] }], "documents": [{ "approvals": [{ "role": "signer1", "fields": [{ "type": "SIGNATURE", "extract": true, "subtype": "CAPTURE", "name": "001SIGNATURE1" }] }, { "role": "signer2", "fields": [{ "type": "SIGNATURE", "extract": true, "subtype": "CAPTURE", "name": "002signature2" }] }, { "role": "signer1", "fields": [{ "type": "SIGNATURE", "extract": true, "subtype": "CAPTURE", "name": "003signature3" }] }], "extract": true, "name": "FileName" }], "name": "PackageName", "description": "Package Description ", "type": "PACKAGE", "emailMessage": "Default Email Notification for E-Signature", "autoComplete": true, "status": "SENT" } Regards, Srikanth

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes
Hi Srikanth, Please refer to my previous comment.
Haris Haidary OneSpan Technical Consultant

Reply to: "messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message

0 votes

Hi, getting the same error, document is correct pdf, can you please check {"messageKey":"error.validation.verifyDocument.couldNotBeFlattened","message":"Could not upload PDF document: it contains a syntax error preventing proper processing of its data.","code":400,"name":"Validation Error"}

Please find the file attached, here is the payload {     "approvals": [{             "fields": [{                     "extract": false,                     "extractAnchor": {                         "anchorPoint": "BOTTOMRIGHT",                         "characterIndex": 0,                         "height": 50,                         "index": 0,                         "leftOffset": 150,                         "text": "PA signature",                         "topOffset": -40,                         "width": 300                     },                     "height": 50.0,                     "left": 0.0,                     "page": 0,                     "subtype": "FULLNAME",                     "top": 0.0,                     "type": "SIGNATURE",                     "width": 200.0                 }             ],             "role": "328727",             "optional": false,             "disabled": false,             "enforceCaptureSignature": false         }, {             "fields": [{                     "extract": false,                     "extractAnchor": {                         "anchorPoint": "BOTTOMRIGHT",                         "characterIndex": 0,                         "height": 50,                         "index": 0,                         "leftOffset": 150,                         "text": "Vendor signature",                         "topOffset": -40,                         "width": 300                     },                     "height": 50.0,                     "left": 0.0,                     "page": 0,                     "subtype": "FULLNAME",                     "top": 0.0,                     "type": "SIGNATURE",                     "width": 200.0                 }             ],             "role": "328726",             "optional": false,             "disabled": false,             "enforceCaptureSignature": false         }     ],     "data": {},     "description": "Part 0",     "extract": false,     "extractionTypes": [],     "fields": [],     "id": "",     "index": 0,     "name": "Order #50568640",     "pages": [] }


Attachments

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off