title: Is it possible to change the font of a parsed HTML in IText?
body: <p>First let me introduce the background around this problem:</p>
  
  <p>I am using the <a href="https://ckeditor.com/ckeditor-5/" rel="nofollow noreferrer">CKEditor</a> to implement some rich text fields in a project, the editor is included through javascript, and handle the fields creating a HTML which is properly rendered by the browser.</p>
  
  <p>The challenge was to include tables generated by the editor on a PDF, I have tried with Jasper Reports but it didn't work very well (the parsed HTML did not render the tables and some styles generated by CKEditor).</p>
  
  <p>I have tested the IText and it worked very well, I was able to parse the tables and almost all the styles of CKEditor throught the following code:</p>
  
  <pre><code>CSSResolver cssResolver = new StyleAttrCSSResolver();
  CssFile cssFile = XMLWorkerHelper.getCSS(new FileInputStream(new File(CKEDITOR_CSS_FILE));
  cssResolver.addCss(cssFile);
  
  HtmlPipelineContext htmlContext = new HtmlPipelineContext(null);
  htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory());
  
  PdfWriterPipeline pdf = new PdfWriterPipeline(document, writer);
  HtmlPipeline html = new HtmlPipeline(htmlContext, pdf);
  CssResolverPipeline css = new CssResolverPipeline(cssResolver, html);
  
  XMLWorker worker = new XMLWorker(css, true);
  htmlParser = new XMLParser(worker);
  
  // Parsing the HTML generated by the editor
  htmlParser.parse(new FileInputStream(HTML));
  </code></pre>
  
  <p>It considers the CSS correctly during the parse and output the following table to me:</p>
  
  <p><a href="https://i.stack.imgur.com/iPjtZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iPjtZ.png" alt="enter image description here"></a></p>
  
  <p><strong>My question is:</strong> Is it possible to change the font of the parsed HTML to use for example, a smaller font or a bold font?</p>
  
  <p>I will have a lot of fields that need to be included on the PDF, each field would be in a different section demanding different formatting. I was not able to find any interface to allow this customization on <code>XMLWorker</code>.</p>