1

I was doing some research, but I didn't found an answer. We have C# app that generates PDF reports (pretty complex ones). Currently we use Crystal Reports to that, but as the software gets more features, Crystal reports don't meet our needs. We are thinking to switch to latex, but we are not completely familiar of its power and what can be achieved.

Main things that concerns us at this point (and we can't find example online) are:

  1. From time to time, sections of our source report files are in RTF format and no way to change this because we are talking about huge library. Is there a way to use RTF code in LaTeX and get the expected RTF formatting on that section?
  2. Can we have sort of extended/complex header for specific sections of the document? Like, we have one section where we want custom header to show, not related to the title of that section, nor with the authors, page number (nothing that looks standard, but some sort of legend that will explain some keys used in that section).
  3. Can we do some basic custom drawings/shapes?

We will really appreciate the answers and samples if possible.

Thank you in advance.

  • Regarding rtf use there is e.g. rtf2latex2e.sourceforge.net/index.html. I never used it but imho the description is right: it won't be fully automatic, you always will have to check and perhaps correct the resulting code. Custom pagestyles/headers should be easy, drawing can be done with tikz -- search the site for examples or look at texample.net/tikz/examples – Ulrike Fischer Aug 11 '16 at 8:20
1

Is there a way to use rtf code in latex and get the expected rtf formatting on that section?

There is this tool called rtf2latex2e. I have never used it so I do not know how well it works. I think, whatever tool you choose to use to convert from RTF to LaTeX, you should not expect exact rendering of the RTF source.

Can we have sort of extended/complex header for specific sections of the document? Like, we have one section where we want custom header to show, not related to the title of that section, nor with the authors, page number (nothing that looks standard, but some sort of legend that will explain some keys used in that section..)

This is most likely doable. The solution depends on exact requirements.

Can we do some basic custom drawings/shapes?

Yes. PGF/TikZ is awesome.

That said, expect to have to do quite a lot of tuning and/or coding in LaTeX, especially if your requirements do not match any of the existing document classes and styles.

  • Thank you both for the quick answers. I have quickly checked the rtf2latex2e and while it could help, I was hoping to just need to include some package and put the rtf code directly in our latex document. The rtf will not be complex, just text style (bold/color/italic/font/line spacing) no images, no tables, no complex objects.. but we have it in rtf and no easy way to change that, so we have to stick with the rtf unfortunately.. thanks for the tikz that was helpful as well. We are aware about the hard work, but Crystal reports are almost impossible already. – aleksandaril Aug 11 '16 at 8:30
  • @aleksandaril: Apparently, somebody has already attempted that. See formatting - Dynamically use RTF-Code in latex-document. – wilx Aug 11 '16 at 8:33
  • I have already checked that and tried the example in sharelatex: link, and since I didn't make it work (basic LaTeX inexperiece probably) I ended up asking question now before I go too deep and find out it is not possible – aleksandaril Aug 11 '16 at 8:41
  • @aleksandaril Beside calling rtf2latex2e dynamically it should also be possible (if you need to support only a small set of commands) to write some code to directly process the rtf. But imho in the long run it is not good to use two formats and it is better to convert the rtf to latex. – Ulrike Fischer Aug 11 '16 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.