0

I use PirmeFaces 7.0 and want to be able to convert the HTML generated by the PrimeFaces TextEditor component

https://primefaces.github.io/primefaces/7_0/#/components/texteditor

into PDF using a Java library, such as itext or apache-fop

Since the above TextEditor component is based on Quill and uses stylesheets from Quill I would like to ask if somebody has experience generating high-quality PDFs based on its input.

Any experience / examples / feedback will be appreciated

NOTE: In the comments some of you suggest an answer with itext converting from HTML with styles.

This does not help me, because I tried to extract the css file used in the PrimeFaces TextEditor component. And, yes, I extarct it, but... somehow the browser does not recognize it. I do not know why, the file is deliberately made human-unreadable

Alex Mi
  • 1,409
  • 2
  • 21
  • 35
  • Yes and no. Yes, it shows me how to use iText to convert HTMLs (thank you), but no, it does not share any experience as of its ability to use the tools above. But thank you for your reploy! – Alex Mi May 18 '20 at 14:48
  • 2
    That's basic stuff. HTML is value bound to your bean and the CSS is fixed (https://github.com/quilljs/quill/tree/develop/docs/assets/css). – Jasper de Vries May 18 '20 at 14:54
  • Look at xhtmlrenderer – Kukeltje May 18 '20 at 18:22
  • Then download the source of quill. The css is readable there – Kukeltje May 18 '20 at 18:47
  • @Kukeltje I tried this, bit it does work, Do you know why: https://stackoverflow.com/questions/61883696/the-quill-publicly-available-css – Alex Mi May 19 '20 at 05:20
  • You mean it does not work? Check my comment and investigate... – Kukeltje May 19 '20 at 07:33
  • @Kukeltje if you mean the link on github here https://github.com/quilljs/quill/tree/develop/docs/assets/css there are two css files there. The one that contains my class is this one https://github.com/quilljs/quill/blob/develop/docs/assets/css/styles.css but again it is, for my purposes, wrong. The CSS class I am interested in is called ql-size-large. Well, the class is indeed in the second css file, but... preceded by id identificator like this: #demo-container .ql-size-large . This DOES NOT solve my problem, sorry – Alex Mi May 19 '20 at 08:06
  • No I mean my comment on the other question. Investigate running the js fiddle... – Kukeltje May 19 '20 at 08:08
  • @Kukeltje Please see the last comment of deceze in my other question. Anyway I posted two quesitons and I do not know what the problem is. I ve got minuses, but no answers I could undrestand, sorry! – Alex Mi May 19 '20 at 08:29

0 Answers0