Report output to rtf files for monospaced fonts in tables not vertically aligned
Posted: 02 Nov 2022 21:08
This is an observation/fix on Report output to rtf files for monospaced fonts in tables not vertically aligned.
I still use a monospaced font for Report tabulated output, e.g. Census. However, I noticed that when a *.rtf Report file is viewed/edited in various editors (e.g. MS Word 365 and LibreOffice), in certain situations within a table, monospaced font data (e.g. Consolas) does not line up correctly vertically e.g.
(but the longer the line the worse it can get)
It seems that spaces are compressed to "make it fit better", which rather defeats the object of using a monospaced font!
This only happens in Print Layout and in and if printed. It displays fine in Draft or Web Layouts. FH PDF output is fine.
I tried many settings options but this is the only way I can find to make it work for MS Word 365.
- Do this only if you wish to copy headers/footers too > create a Break point (e.g new page) at the end of your document
- Copy all data you want (include the last break point if you want header/footers)
- Open a New blank document
- paste
- save. I have tested docx and a new rtf, and both work fine.
If you then view alt+F > options > advanced > Compatibility for each file. The original rtf file has many items under Compatibility Options, the copy/paste docx version has no compatibility options. The new rtf version has far fewer compatibility options. I tried cloning the same options to the original rtf file, but still no vertical alignment.
This option also worked, but not sure how compatible it would be elsewhere, it did not work well in Libre Office.
- save the *.rtf file as *.odt file, it then displays correctly.
So it looks like FH is passing some settings to the rtf file that cause this problem.
If anyone knows of another fix so that the original *.rtf monospaced table data does not compress spaces, info would be gratefully received.
I still use a monospaced font for Report tabulated output, e.g. Census. However, I noticed that when a *.rtf Report file is viewed/edited in various editors (e.g. MS Word 365 and LibreOffice), in certain situations within a table, monospaced font data (e.g. Consolas) does not line up correctly vertically e.g.
(but the longer the line the worse it can get)
It seems that spaces are compressed to "make it fit better", which rather defeats the object of using a monospaced font!
This only happens in Print Layout and in and if printed. It displays fine in Draft or Web Layouts. FH PDF output is fine.
I tried many settings options but this is the only way I can find to make it work for MS Word 365.
- Do this only if you wish to copy headers/footers too > create a Break point (e.g new page) at the end of your document
- Copy all data you want (include the last break point if you want header/footers)
- Open a New blank document
- paste
- save. I have tested docx and a new rtf, and both work fine.
If you then view alt+F > options > advanced > Compatibility for each file. The original rtf file has many items under Compatibility Options, the copy/paste docx version has no compatibility options. The new rtf version has far fewer compatibility options. I tried cloning the same options to the original rtf file, but still no vertical alignment.
This option also worked, but not sure how compatible it would be elsewhere, it did not work well in Libre Office.
- save the *.rtf file as *.odt file, it then displays correctly.
So it looks like FH is passing some settings to the rtf file that cause this problem.
If anyone knows of another fix so that the original *.rtf monospaced table data does not compress spaces, info would be gratefully received.