0

How to convert HTML into formatted Text, so that the layout such as spacing, table borders, element positioning remains intact? Is there any tool for the same?

Tried a few options already as follows but output formatting is not as desired:

  1. TxtControl conversion
  2. PythonCom conversion

Issue: Converting HTML table with spacing between cells resulting in cell content getting moved to next line hence disturbing the formatting. Expected output is: Table row cell content shall be in the same line and border shall be intact in the text file.

Also, PDF/RTF to TEXT conversion will also work just formatting should be intact.

Attaching screenshots for more clarity on the requirement. INPUT HTML SCREENSHOT

OUTPUT TEXT SCREENSHOT

Alternatively, is there any way to read HTML character by character and write into text file so that the layout does not change in text output.

Div22
  • 63
  • 1
  • 7

1 Answers1

0

Does this work?

You can convert HTML into BBCode and you have a RTF editor.

http://www.ecardmax.com/hoteditor/

Just make sure to check the HTML Checkbox so that you can insert HTML into that. So when you paste your text, you choose the HTML part, you should try both.

 

Here are the results of the post from yours in BBCode

Note that that is my edited version:

How to [B]convert[/B] HTML into formatted Text, so that the layout such as spacing, table borders, element positioning remains intact? Is there any tool for the same?
Tried a few options already as follows but output formatting is not as desired:
[LIST=1]
[*]TxtControl conversion
[*]PythonCom conversion[/LIST]
[B]Issue:[/B] Converting HTML table with spacing between cells resulting in cell content getting moved to next line hence disturbing the formatting.Expected output is : Table row cell content shall be in same line and border shall be intact in text file.
Also, PDF/RTF to TEXT conversion will also work just formatting should be intact.

It could be that you manually need to remove something from it, as example I had to remove the text called "Thanks for your edit!" that appears when you edit something and it's still in pending.

This is useful if you want to convert old posts you can't access anymore on XenForo.

You then could put it into a text replacer, where it could replace [B] into **

karl-police
  • 983
  • 8
  • 21
  • Now that you've edited the question, I see that this answer is not related on that what you want. You look for something like HTML to ASCII, what I have found is this which can convert HTML Tables to ASCII tables, https://www.perlmonks.org/?node_id=338485 @Nim22 – karl-police May 30 '19 at 10:20