Skip to main content
Participant
May 15, 2022
Question

Document Generation API Not handling carriage return/new line in conditional expressions

  • May 15, 2022
  • 1 reply
  • 826 views

Hi, 

I'm having trouble with a section of my document where I would like to include multiple paragraphs. It seems the conditional  {% conditional-section expr(Binding = "Yes") %} will just get ignored and show up in the final document if there is a "return" anywhere before the {% end-section %} 

Is that expected behaviour or am I doing something wrong?

Thanks

    This topic has been closed for replies.

    1 reply

    Raymond Camden
    Community Manager
    Community Manager
    May 16, 2022

    I haven't seen this myself - can you make a small reproduceable case in Word and share it?

    beeaxemanAuthor
    Participant
    May 16, 2022

    I tried reproducing it in a simpler document, but now I'm getting a error from the ServicesAPI. I backed everything out (literally just changed the template back) and the API error persists.  I can't find a service health page to check if its some wider issue. but here is what I'm getting from the SDK/API call.

     

    2022-05-16T22:27:56.253Z 5e208f3d-ed3a-4ce4-a96d-10ee943a1a24 INFO Exception encountered while executing operation ServiceApiError: Internal server error; transactionId=Ff0hpWLWgu23xEzTbLnQ8hj5m4jTqIzn
    at /var/task/node_modules/@adobe/pdfservices-node-sdk/src/internal/api/cpf-api.js:197:20
    at IncomingForm.<anonymous> (/var/task/node_modules/formidable/lib/incoming_form.js:107:9)
    at IncomingForm.emit (events.js:400:28)
    at IncomingForm.emit (domain.js:475:12)
    at IncomingForm._maybeEnd (/var/task/node_modules/formidable/lib/incoming_form.js:557:8)
    at JSONParser.parser.onEnd (/var/task/node_modules/formidable/lib/incoming_form.js:532:10)
    at JSONParser.end (/var/task/node_modules/formidable/lib/json_parser.js:29:8)
    at IncomingMessage.<anonymous> (/var/task/node_modules/formidable/lib/incoming_form.js:132:30)
    at IncomingMessage.emit (events.js:412:35)
    at IncomingMessage.emit (domain.js:475:12) {
    requestTrackingId: 'vwzDSI5OcF5eDy02TLjWXQvEahTVD3zX',
    statusCode: 500,
    errorCode: 'INTERNAL_SERVER_ERROR'
    }

     

    I realize this might be off topic, but I was just working through examples of what worked and didn't to post here and on the second example, everything broke.

    beeaxemanAuthor
    Participant
    May 16, 2022

    Ok - sorry for the noise here. I redeployed the lambda function from a backup and it started working again. Not sure what I did to trigger the failure. I'm going to try and use postman to send you some exmaples without complicating things.