Skip to main content
Known Participant
October 26, 2022
Answered

Were there any breaking changes between require adobe/pdfservices-node-sdk v2.2 and v3.0?

  • October 26, 2022
  • 3 replies
  • 2248 views

Checking around I don't see any.

 

I'm returning back to a document which I haven't touched in months.  The json I am trying to pass is valid (console.log) before I create the payload and valid after (console.log) but a previously working tag is not rendering correct/any values. Really stumped.

 

TIA.  

 

 

This topic has been closed for replies.
Correct answer Raymond Camden

I stand corrected, it DOES work for me. It failed when Word inserted "smart" quotes. When I switched to NON smart quotes, it worked:

 

3 replies

Vince5E52Author
Known Participant
October 26, 2022

Thanks for the quick response and look-see.

I've got some hashtags which I am passing to the docx template


const hashtags = fooHashtags.map((i) => '#' + i);

 

const compactedhashtags = hashtags.map(function (item) {
return item.replace(/\s+/g, '').toLowerCase();
});


sampleData = {
<other variables>
hashtags: compactedhashtags,
}


In the docx, using this to get all on one line, {{ $join(hashtags,", ") }} which used to return the expected result but now returns 'hashtags'.

Raymond Camden
Community Manager
Community Manager
October 26, 2022

I can confirm it isn't working. Are you sure it did before? If so, I'll log the bug. Please note that in the meantime, you could just do the join in your code, w/ a reduce() call for example.

Raymond Camden
Community Manager
Raymond CamdenCommunity ManagerCorrect answer
Community Manager
October 26, 2022

I stand corrected, it DOES work for me. It failed when Word inserted "smart" quotes. When I switched to NON smart quotes, it worked:

 

Vince5E52Author
Known Participant
October 26, 2022
Thanks for the quick response and look-see.

I've got some hashtags which I am passing to the docx template-->

const hashtags = fooHashtags.map((i) => '#' + i);

const compactedhashtags = hashtags.map(function (item) {
return item.replace(/\s+/g, '').toLowerCase();
});


sampleData = {

hashtags: compactedhashtags,
}


In the docx, using this to get all on one line, {{ $join(hashtags,", ") }} which used to return the expected result but now returns 'hashtags'
Raymond Camden
Community Manager
Community Manager
October 26, 2022

Nope, there shouldn't be. You said 'tag', so I assume you mean a Document Generation call. Can you share more details?