We have been using Aspose.Words for quite some time now and we had a situation where we accidentially ended up with a trial license in one of our applications. We didn’t think this would be that big of an issue, seeing as we could just replace the license and then re-run the .word document to create the .pdf, but instead of just adding the “Trial version” text to the .pdf, it modified our original word document and saved the “Trial version” text to it. The only real problem with this is that if the document is longer than around ten pages, the service will CUT OFF the document at ten pages and leave a message at the bottom saying “This document has been truncated due to use of a trial license” and then SAVE the original word document and run the service to create the .pdf.
We understand that we ended up with a trial license. But the issue is that the application deleted parts of our clients documents. For example, the client uploads a document that is ten pages, then they run the pdf convertor. The issue here is that your application will delete part of the ORIGINAL document. This meaning the client loses part of their original document that they can never get back.
Another issue is if the license file is missing from the directory it will also produce this trial license error and cut off the policy.
/// Returns true if the Aspsoe.Words license is set.
private static bool IsLicenseSet()
// We will insert this text at the beggining of the document.
// If the license set this text will be in th efirt paragraph,
// if not an evaluation watermark will be in the first paragraph.
const string text = "This is text used to check if the license is set";
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Save and open the document. If Aspose.Words works in evaluation mode it will add a watermark.
using (MemoryStream docStream = new MemoryStream())
docStream.Position = 0;
doc = new Document(docStream);
// Check text of the first paragraph.
return (doc.FirstSection.Body.FirstParagraph.ToTxt().Trim() == text);