styles.loadTagStyle("strong", "b", "");
styles.loadTagStyle("strong", "size","8px"); 

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Sundowner71
> Sent: Tuesday, January 08, 2008 1:34 PM
> To: [email protected]
> Subject: Re: [iText-questions] Converting HTML in PDFPCell
> 
> 
> 
> 
> If you use HTMLWorker, you don't have to worry about parsing
> the XHTML snippet yourself, you just have to define the style for
> each tag.
> br,
> Bruno
> 
> sundowner wrote:
> 
> Now i have got the following code-snippet:
> -------------------------------
> String text = val.getStringValue();            //my Text to print out 
> StringReader reader = new StringReader(text);
>                       
> StyleSheet styles = new StyleSheet();
> styles.loadTagStyle("strong", "font-weight", "bold");
> styles.loadTagStyle("strong", "font-size","8");
>                       
> HTMLWorker htmlWorker = new HTMLWorker(document);
> ArrayList cc = new ArrayList();
> cc = htmlWorker.parseToList(reader, styles);
>                       
> Phrase p1 = new Phrase();
> for (int i = 0; i < cc.size(); i++){
> Element elem = (Element)cc.get(i);
> p1.add(elem);
> }
> cell = new PdfPCell(p1);
> ----------------
> Problem: The style is not working. What am i doing wrong ?
> 
> Bjoern
> -- 
> View this message in context: 
> http://www.nabble.com/Converting-HTML-in-PDFPCell-tp14684165p1
> 4689778.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> 
> --------------------------------------------------------------
> -----------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.n
> et/marketplace
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to