Hello,
I tried to import an HTML text into a paragraph with the property IsHtmlTagSupported at true. But all the links are underline automatically and I don't want that. I t(ry with the text-decoration property of CSS but it doesn't work. Any idea?
Here's my code :
class Program
{
private const string FileName = @"TextDecorationSample.pdf";
private const string LicenseFileName = @"Aspose.Total.lic";
/* Here is a simple link
* we can set the following CSS attributs :
* - font-weight
* - font-size
* - color
* => But the text-decoration doesn't work
*/
const string Link = "Google";
/* Our needs are :
* - to dispay a link WITHOUT underlining it.
* - to include additional HTML tag with basic CSS in the text show by the previous link
*/
const string AdvancedLink =
"Google";
static void Main()
{
(new Aspose.Pdf.License()).SetLicense(LicenseFileName);
var pdf = new Pdf{OpenType = OpenType.None};
var section = new Section();
var text = new Text(Link) { IsHtmlTagSupported = true };
section.Paragraphs.Add(text);
var advancedText = new Text(AdvancedLink) { IsHtmlTagSupported = true };
section.Paragraphs.Add(advancedText);
pdf.Sections.Add(section);
pdf.Save(FileName);
(new System.Diagnostics.Process {StartInfo = {FileName = FileName}}).Start();
}
}
Thanks in advance!
I'm using Aspose PDF 6.2.0.0 and I cannot change version for the moment.