Hi Support.
I have built a solution with spire.doc (.NET8 REST service) and have requested a trial license key. This key works perfectly when I tried to build a .Net console application, but now with a .NET8 REST service I have this problem.
The FIRST time I execute a call to my endpoint which performs word merge etc. everything is fine - but every subsequent call/execution the Evaluation mark is visible on the merged output document.
If this is only the case on my eval license this is off course no problem - but I am going to buy the license - but would like to know that this wouln't give me problems with the right license. (I am on a very tight schedule...)
Can you elaborate ?
My code:
MergeResultModel apiResult = new MergeResultModel();
Spire.Doc.License.LicenseProvider.SetLicenseKey("d/FeAQCVgJfvbbla bla bla");
var doc = new Spire.Doc.Document();
if (!String.IsNullOrEmpty(wordMergeModel.Filename))
doc.LoadFromFile(wordMergeModel.Filename);
foreach (var sectionValue in wordMergeModel.HeaderSectionValues)
{
replaceBookmarkWithString(doc, sectionValue.Bookmark, sectionValue.Value);
}
foreach (var detailSection in wordMergeModel.DetailSections) // Rows
{
int row = 0;
Section sec = doc.Sections[0];
TableRow bookmarkRow = null;
foreach (Bookmark bookmark in doc.Bookmarks)
{
if (bookmark.Name == detailSection.TableBookmark)
{
bookmarkRow = bookmark.BookmarkStart.Owner.Owner.Owner as TableRow;
}
}
// Fill table
Table table = bookmarkRow.Owner as Table;
TableRow rowClone = bookmarkRow.Clone();
int cell = 0;
foreach (var detailSectionValue in detailSection.DetailSectionValues) // Fields
{
var par = rowClone.Cells[cell].Paragraphs[0];
par.Text = detailSectionValue.Value;
cell++;
table.Rows.Add(rowClone);
}
table.Rows.RemoveAt(detailSection.DeleteTableRow); // delete bookmarked line which is just used for cloning.
doc.SaveToFile(wordMergeModel.OutputFilename);
doc.Close();
doc = null;