Hi Pavel,
after exploring the not recommended example and the API source on github, I was able to find the necessary information to talk to the api.
Before I continue to implement the merge-API, I have a short question:
Would it be possible to merge multiple records to one assembly job? So that I could assign a database and will get a combined output?
Like all template pages for each record in one output document?
Thanks a lot!
Nils
nils.pf:
Hi Pavel,
after exploring the not recommended example and the API source on github, I was able to find the necessary information to talk to the api.
Before I continue to implement the merge-API, I have a short question:
Would it be possible to merge multiple records to one assembly job? So that I could assign a database and will get a combined output?
Like all template pages for each record in one output document?
Thanks a lot!
Nils
Well, I guess the answer is yes, as the example code shows an array of values for each field. However, I'm not able to post a datasource object. I'm getting the following error:
'The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json'. This can be because a WebContentTypeMapper has not been configured on the binding. See the documentation of WebContentTypeMapper for more details.'
I'm using the api as any other that works. and like the example code is showing:
http://www.groupdocs.com/docs/display/assemblyapi/Merge+Datasource
I think it's a bug. Could you check and if so fix it?
I use this repository: https://github.com/groupdocs-total/groupdocs-javascript
In an express.js environment.
I attached a code snippet to check the datasource object. but I guess it's the cloud endpoint that's causing the error.
Thanks and regards
Nils
Hi Nils,
Thanks for checking!
will send you a message.
Cheers
Nils
Hi again,
Thanks for the quick reply. Could you send me a doc that should work? I trued it with a new created document and I’m getting the same raw format error again
Hi again,
Thanks for the code and the doc but I’m still getting the Raw error message when the code is supposed to post the datasource. I’m getting nuts.
I don’t get it, why it’s different when you try it. I installed the npm module (npm install groupdocs-javascript) and used the exact code you sent.
Hi,
Hi,
Hi Pavel,
Thanks for looking into it. Actually, I’m calling the original api from the groupdocs-javascript functions while I’m listening for GET requests in my node server. So I’m listening for get and then sending a post from the server, using the api functions. However, it’s quite tricky to capture the request differences from client to server side and as I’d use your api from an intranet aplication, I decide to run the api on the client, as it’s obviously working there.
I took a look at the output file, which was unfortunately showing the three values of the datasource object in one document. I would have expected three pages, value1 on page one, value2 on page2 and so on…
Is word mail merge possible? or would that mean, that I need to start an assembly job for each record?
Cheers
Nils
Hi Nils,
Hey Pavel,
Thanks for the quick response. Probably I’m lost in translations as I don’t know if mail merge is the correct translation to the german word “seriendruck”. I meant that no matter how many pages the template has, I will get copies of the template. So if I have three values in my datasource object, I will get three copies of the template in one output PDF. Or if not possible with datasource objecct, maybe with a csv or xls file that has fitting column names to merge fields.
Regards
Nils
Hi gain,
so, is it possible through the cloud APIs?
I’d like to send a URL to a word file, one URL to a CSV file to get a merged PDF file back that contains a copy of the word doc template for each record in the PDF file. It would be also fine if steps in between would be necessary, as long as it’s possible. Could you point me to the API funcitons I need to use to achieve this?
Hi Nils,
http://www.groupdocs.com/docs/display/assemblyapi/API+Reference
sorry, I think you don’r understand what I’m up to. I’d like to use the API to get a bulk output like described here:
Use mail merge to personalize letters - Microsoft Support
Cheers
Nils
Hi Nils,
Hey Pavel,
Thanks a lot for your help! Well, I think requesting for each record wouldn’t work as we are talking about to many records. However, I will use the HTML conversion then. There is no way to get the HTML output in one file, is it?
Currently I’m getting a zip archive with webfonts, css files and the html file. it would be great if there is an option to integrate all these files into one HTML file.
Regards
Nils
Hi Nils,