IF RTRIM (OUT, CHR (10)) NOT IN ('<PRE>', '</PRE>')
THEN
DBMS_OUTPUT.put_line (OUT);
END IF;
END LOOP;
END;
This procedure displays proper tabular output.
But in few cases it shows tabular output along with <PRE> </PRE> tags.
Also in few cases it inserts unnecessary carriage returns in the
output and therefore the rows in output gets misaligned.

Is this the problem with tool that displays output?
I have tested it with SQL * Plus, Toad, Oracle SQL Developer but it
displays same output in each case.