Hi Jakob,
My requirement is as follows:-
I have two html contents as shown below
1) <p><strong>Type of Drink</strong></p>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
2)
<p><strong>Type of Drink</strong></p>
<ul>
<li>Coffee</li>
<li>Juice</li>
<li>Milk</li>
</ul>
I have to add this to a PDF Document. I have parsed with
HTMLWorker.parseToList()
method and added successfully to the document. I used PdfPCell.addElement()
method to add this. I have applied the styles for the entire text as well.
However as per my new requirement, I have to compare both these strings and
apply style only for the changed text. For example, Tea is replaced with
Juice. So I have to change the color of this as RED. When I apply the style
it is applying for the entire text. How can I compare two elements and find
out in case of any differences? I have applied the Styles while calling the
HTMLWorker.parseToList() method itself. So it is being applied to the entire
content. So is there any way to apply the style only to a particular text. I
have used the Elements.getChunks() method to extract the content for a list
item, but while adding as a chunk, it is not adding the bullets to my pdf.
Please help me on this.
Regards
DeepuMani
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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