Hi,

I have been using itextsharp for a while. At this time I am working on a
project that requires to convert html to pdf and this html have
some highlighted sections.
I could not find any references on how to make highlighting text to work in
itextsharp documentation.


What I am trying to accomplish is converting html to pdf where the html
have tags using background color in order to highlight text.

So far I have tried the following:

StyleSheet styles = new StyleSheet();
            styles.LoadTagStyle(HtmlTags.SPAN, HtmlTags.BGCOLOR, "YELLOW");

IList<iTextSharp.text.IElement> htmlarraylist =
iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(new
StringReader(htmlText), styles );


the code above is not working for tags <span>highlight text</span> or when
using the htmlparser for html that has background-color style

Is there a way to make  html tags/sections highlighted  or change the
background color of a html tag?


Changing the background color of a cell in  a table or the background color
of the page of the document will not work for me due to I have html with
specific sections that need to be highlighted


Thank you in advance

any help is appreciated


-- 
Victor Marquez Lona
Software Engineer
eMetric, LLC
211 N Loop 1604 E, Suite 170
San Antonio, Texas 78232
Toll Free: (877) 829-7769
Office: (210) 496-6500
Fax: (210) 496-6504
Email: [email protected]
<[email protected]>Website: www.emetric.net
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to