Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active December 18, 2020 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/edcdfd228afd7ae8c86dbfa921417ada to your computer and use it in GitHub Desktop.
Save bjoerntx/edcdfd228afd7ae8c86dbfa921417ada to your computer and use it in GitHub Desktop.
var os = new OAuthSettings(
"dsserver.yqBdWzA3x4toe123prtSPYZZqTljS8JY",
"ggWxH3sWaQH123anqM6Vsazyd0CfFIcw");
var s_dp = new DocumentProcessing("https://trial.dsserver.io", os);
List<Customer> customers = new List<Customer>();
var customer = new Customer() {
Company = "Text Control",
Name = "Jack Petersen"
};
customers.Add(customer);
MergeBody mergeBody = new MergeBody() {
MergeData = customers,
MergeSettings = new MergeSettings() {
Author = "Text Control",
DocumentTitle = "My Document"
},
Template = System.IO.File.ReadAllBytes("App_Data/sample.docx")
};
var results = await s_dp.Merge(mergeBody, ReturnFormat.PDF);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment