Hi,
I am getting “Evaluation Only…" text while converting word to pdf in PRODUCTION environment. But in QA and STAGE no such text, its working fine. I am using purchased license version. Following the code snippet which I’m using in all the environment:
Using: Aspose.Words Version: 20.5.0
My Project: .Net Core 3.1
In class constructor:
private License license = new License();
public MemoryStream ConvertWordToPDF(MemoryStream stream)
{
MemoryStream pdfStream = new MemoryStream();
MemoryStream outStream = new MemoryStream();
try
{
license.SetLicense(@"Aspose.Words.NET.lic");
Document doc = new Document(stream);
// Save the document to stream.
doc.Save(outStream, Aspose.Words.SaveFormat.Pdf);
// Convert the document to byte form.
byte[] docBytes = outStream.ToArray();
// The bytes are now ready to be stored/transmitted.
// Now reverse the steps to load the bytes back into a document object.
pdfStream = new MemoryStream(docBytes);
}
catch (Exception ex)
{
_logger.LogError(ex, "ConvertWordToPDF");
}
finally
{
stream.Close();
outStream.Close();
}
return pdfStream;
}
Please suggest any work around for this issue.
Thanks
Chandan