I have the source code for a web page stored in a variable. The web page is like this:
http://216.92.61.99/sample.htm .
Now I need a script that will process the content of the variable to keep all the formatting intact (including the ordered-list outline structure and the justified paragraphs) but add line numbering to the left side.
So the script would output a web page that looks just like this pdf file:
http://216.92.61.99/LineNumbering.pdf . The method would have to be compatible with ordered lists and justified paragraphs, to keep that formatting intact.
In other words, the web page starts out looking like this:
http://216.92.61.99/sample.htm , but ends up looking like this:
http://216.92.61.99/LineNumbering.pdf (but in html--not pdf). How can this be done? (I'm also posting in the css zone, in case css is needed to accomplish this along with perl.)
Update: I guess something like this web page (
http://216.92.61.99/sampleWithNumbers.htm) would be the general idea, but it has these problems:
A) the line numbers don't exactly match up to the exact same level as the lines of text (the numbers are a tiny bit lower); and
B) the text moves (thus invalidating the original line numbers) if the page is viewed more narrowly, such as inside a frame (instead, the relationship of text and line numbers needs to stay constant); and
C) the script would somehow have to know how many of the line numbers (e.g. 1<br> 2<br> 3<br>, etc.) to add into the left column, based on how much text is in the right column (because the left and right columns are independent of each other).
Looking for expert guidance . . . .
Start Free Trial