Sign In  Sign Up Live-Chat

Supported HTML tags

Last post 08-14-2008, 1:25 AM by forever. 6 replies.
Sort Posts: Previous Next
  •  07-08-2008, 5:54 AM 134693

    Supported HTML tags

    Pls let me know the exact list of HTML tags supported in "Text" object.

    Thanks
    Gilbert

     
  •  07-08-2008, 7:33 AM 134716 in reply to 134693

    Re: Supported HTML tags

    Hello Gilbert,

    Thanks for considering Aspose.

    Currently, Aspose.Pdf supports a few tags, which are discussed in the below topics but in future releases, more HTML tags would also be supported to strengthen this feature.

    • <font face= size= color=>
    • <u>, <b>, <i>
    • <strong>, <em>, <var>, <s>
    • <br>
    • <p>
    • <table>
    • <ul>
    • <ol>
    • <sup>
    • <sub>
    • <a>

    For more information kindly visit Working with Text Containing HTML Tags


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
     
  •  08-07-2008, 5:13 AM 138707 in reply to 134716

    Re: Supported HTML tags

    I could see the following tags also at the documentation page link given by you.

    <div>
    <blockquote>
    <span>
    <img>
    <hr>
    <table>

    Out of these I tried <img> and it is working.

    I tried <hr> and it is NOT working. Is <hr> tag not supported?

    Also, is <h1>, <h2>, <h3> tags supported?

    Thanks,

    Gilbert

     

     
  •  08-07-2008, 6:25 AM 138720 in reply to 138707

    Re: Supported HTML tags

    Attachment: Present (inaccessible)

    Hello Gilbert,

    I have tested the scenario and in my case <HR> tag is working properly. The resultant Pdf is in attachment. I have used following code snippet.

    Pdf pdf1 = new Pdf();
    Aspose.Pdf.
    Section sec1 = pdf1.Sections.Add();
    String s = "Following is the Horizontal line created through <HR> tag.";
    string s1 = "<HR WIDTH=\"75%\" COLOR=\"#FF0000\" SIZE=\"4\">";

    //Create text paragraphs containing HTML text
    Text t = new Text(s);
    Text t1 = new Text(s1);
    t1.IsHtmlTagSupported =
    true;
    //Add the text paragraphs containing HTML text to the section
    sec1.Paragraphs.Add(t);
    sec1.Paragraphs.Add(t1);

    //Save the pdf document
    pdf1.Save(@"C:\Temp\HRTag_Test.pdf");

    I am sorry to inform you that <H1>,<H2>,<H3> tags are not yet supported. We would try to support them in future version, but I am afraid we cannot support them in short time.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
     
  •  08-13-2008, 10:17 AM 139563 in reply to 138720

    Re: Supported HTML tags

    Ok Thanks. I will try the code snippet and let you know if I still face problem.

    Meanwhile, can you let me know whether nested <UL> tags are supported. I am getting the nested UL in the same level of the parent UL.

    Thanks,

    Gilbert

     
  •  08-13-2008, 11:25 PM 139641 in reply to 139563

    Re: Supported HTML tags

    Hi Gilbert,

    In my test nested <UL> tags are supported but it seems there is problem with bullets. We will check it further and reply to you soon.


    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  08-14-2008, 1:25 AM 139649 in reply to 139641

    Re: Supported HTML tags

    Sorry we found the nested <UL> tags are not supported. We will investigate this issue further and try to support it in the future version.
    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML