SQL syntax highlighting in .docx file

2017-03-03 Thread Peter Remec
I'm generating a .docx file using Apache POI. This file contains a lot of SQL code and is quite unreadable so I was thinking about coloring that code. Any idea how to achieve that? I understand that POI doesn't have some highlighter to complete this task. I'm just looking for some idea of how

Re: SQL syntax highlighting in .docx file

2017-03-03 Thread Javen O'Neal
Are there any third party libraries that can lex SQL and return an rich text string? This would be the easiest way to avoid writing your own syntax highlighter that understands the full SQL grammar. Looks like there area bunch of online syntax highlighters that will produce HTML output. [1] You

Re: SQL syntax highlighting in .docx file

2017-03-03 Thread Andreas Reichel
On Fri, 2017-03-03 at 08:25 +, Peter Remec wrote: > I'm generating a .docx file using Apache POI. This file contains a lot of SQL > code and is quite unreadable so I was thinking about coloring that code. Any > idea how to achieve that? > > I understand that POI doesn't have some highlighte