Sorry guys, 

Is there anyone with is problem?

Thanks again



roboboot wrote
> Hi all, 
> 
> I use a very simple CSS in XMLWorker to render HTML to PDFs. Here is the
> CSS:
> 
> ***********
> body { font-family: "Times New Roman;" }
> 
> p.testoJustify {
> text-align:justify; 
> text-justify:inter-word;
> }
> ***********
> 
> The problem is on the ".testoJustify" selector. When I use this selector,
> the resulting PDF doesn't have the text justified, while without the
> selector, so only with p {... }, it works fine! 
> 
> The java code is the following:
> 
> ***********
> FontFactory.registerDirectories();
> 
> XMLWorkerFontProvider fontProvider = new XMLWorkerFontProvider();
> CssAppliers cssAppliers = new CssAppliersImpl(fontProvider);
> HtmlPipelineContext htmlContext = new HtmlPipelineContext(cssAppliers);
> htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory());
>                        
> CSSResolver cssResolver
> =XMLWorkerHelper.getInstance().getDefaultCssResolver(true);
> cssResolver.addCss(Context.pdfCss, true);
> Context.getInstance().getLogger().debug("CSS: "+Context.pdfCss);
> Pipeline<?> pipeline = new CssResolverPipeline(cssResolver,
>                                                               new 
> HtmlPipeline(htmlContext,
>                                                                       new 
> PdfWriterPipeline(pdfDocument, pdfWriter)));
> ***********
> 
> This is the link to JSFiddle showing that CSS is corrected applied on HTML
> page, but not XMLWorker:
> 
> http://jsfiddle.net/6vrMP/
> 
> Any idea?
> 
> Thanks





--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/XMLWorker-CSS-does-not-work-only-if-it-is-selected-the-class-attribute-of-a-TAG-tp4658789p4658928.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
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

Reply via email to