Microsoft Word Mail Merge in Ruby using Aspose.Words REST API

Hi Aspose team,


I’m evaluating the Aspose.Words Cloud.
I’ve tried NodeJS SDK and worked well but when I tried Ruby SDK, I found an issue with double byte letters e.g. Japanese.

I faced an error with “\x8F” from ASCII-8BIT to UTF-8. It is typical encode issue. I noticed aspose_storage_cloud-1.0.1/lib/aspose_storage_cloud/api_client.rb line 228

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #a9b7c6; background-color: #2b2b2b} span.s1 {color: #da4939} span.s2 {color: #0078b4} span.s3 {color: #cc7831} span.s4 {color: #6a8759} span.s5 {color: #cc7833} span.s6 {color: #9876aa}

File.open(path, 'w') { |file| file.write(response.body) }


I modified (path, 'w') to (path, 'wb') then it works fine. Is there any better solution? I don't want to modify the file inside of the gem.

Then, I tried put_execute_mail_merge_online with exact same code (with my key and sid) in http://www.aspose.com/docs/display/wordscloud/Execute+Mail+Merge+without+Regions+without+using+the+Cloud+Storage
but I had another error.
aspose_words_cloud/api_client.rb:48:in `call_api': Bad Request (AsposeWordsCloud::ApiError)

In dashboard API usage log, activity usage said
Error: Expected MIME multipart request.. Method: Execute document mail merge online.. Parameters: withRegions 'False',cleanup ''
I guess MIME is set by the API and it would not be related to double byte. I use Ruby 2.3.1.

One more thing, there is a dead link in above page http://www.aspose.com/docs/display/wordscloud/executeMailMerge+vs+executeTemplate
I wanted to know the difference of two but I couldn't.

Could you help me to find a solution? Thanks.
Hi,

Thanks for your inquiry. We are working over your query and will get back to you soon. (EXMP-1127)

Best regards,

@j1481394

Please note we have launched a new revamped Aspose.Words Cloud SDK for Ruby. Now, you can populate MailMerge and Mustache templates with a single API. Please check Working with Mail Merge documentation for more details. Also it includes built in Methods for storage related tasks.