Assuming you have managed to stop the Footer repeating for other detail records where it does not apply I suspect that your approach is as clean as anything else.
The only other thought that occurs to me, based on your description and what I can see form the images posted, would be to take the entire block of 2 lines, including the code, and "slice and dice" it to extract the code and the description. In effect it would doing much the same as you have already done so if what you have works for you in all instances there is not a lot of point in doing anything differently.
Traditionally that sort of programming decision (to offset the "extension" part of a field) taken for an original report is extremely rare in my experience. Similar thing s can happen with PDF files (is this a PDF original?) . If things get really unpleasant, especially useful with awkward PDF files, there may be some sense in looking at the first pass extraction and deciding whether the best approach would be to just do a basic extract with every line as a single field. Then process the result to an output file perhaps removing all leading spaces from every line and then apply the required modelling to the resulting file rather than the original input file.
However, in this case that would not really move you any further forward and would not save any effort for intermediate steps in your process.
Does you solution work for you or has it left residual problems that you still need to address?