How to eliminate blue text and hyperlink from documents?
Posted: Tue Apr 30, 2019 4:11 am
We are rendering some of the documents like Closing Statement,Disclosure Form,CDF and Master Statement by following lines of code(For Reference). Documents are getting generating fine but we are getting blue text and hyperlink in the documents.
How can we eliminate blue text and hyperlink from rendered documents?. I have attached the sample document generated from this.
IDocumentInfo docInfo = docMgr.Documents.Where(t => t.Title == docName && t.Identifier.Name.Contains("DOC")).First();
RenderPrompts prompts = new RenderPrompts();
context = GetContext(identifier, Order);
IRendering rendering = renderer.Render(docInfo, context, prompts);
string FileName = string.Format("{0}_{1}", OrderNumber, docInfo.Title);
string FilePath = Convert.ToString(ConfigurationManager.AppSettings["SoftProDocPath"]);
string GeneratedFile = string.Format("{0}\\{1}.pdf", FilePath, FileName);
using (Stream file = File.Create(GeneratedFile))
{
ExportSettings Settings = new ExportSettings() { Format = DocumentFormat.PortableDocumentFormat, Redacted = true };
Stream docStream = rendering.Export(Settings);
docStream.Seek(0, SeekOrigin.Begin);
docStream.CopyTo(file);
}
docDict.Add(string.Format("{0}.pdf", FileName), new MemoryStream(File.ReadAllBytes(GeneratedFile)));
File.Delete(GeneratedFile);
Thanks in Advance.
How can we eliminate blue text and hyperlink from rendered documents?. I have attached the sample document generated from this.
IDocumentInfo docInfo = docMgr.Documents.Where(t => t.Title == docName && t.Identifier.Name.Contains("DOC")).First();
RenderPrompts prompts = new RenderPrompts();
context = GetContext(identifier, Order);
IRendering rendering = renderer.Render(docInfo, context, prompts);
string FileName = string.Format("{0}_{1}", OrderNumber, docInfo.Title);
string FilePath = Convert.ToString(ConfigurationManager.AppSettings["SoftProDocPath"]);
string GeneratedFile = string.Format("{0}\\{1}.pdf", FilePath, FileName);
using (Stream file = File.Create(GeneratedFile))
{
ExportSettings Settings = new ExportSettings() { Format = DocumentFormat.PortableDocumentFormat, Redacted = true };
Stream docStream = rendering.Export(Settings);
docStream.Seek(0, SeekOrigin.Begin);
docStream.CopyTo(file);
}
docDict.Add(string.Format("{0}.pdf", FileName), new MemoryStream(File.ReadAllBytes(GeneratedFile)));
File.Delete(GeneratedFile);
Thanks in Advance.