Formatting Fortran output of Maxima expressions wrt placement characters



Hello,
 
This was mentioned in passing in a previous post but I am using Maxima to symbolically generate some equations and I want to export to an GNU Octave m-file for further numerical work.
 
At the moment I don't want to try something like SAGE where Octave can interact with Maxima at run time since there is only minor editing to format a fortran expression to Octave e.g. ** to ^ etc. and I'm more confident in using the symbolic capabilities in Maxima than the sympy module in Python (I think that sympy is also  accessible in SAGE) 
 
In Maxima one just uses the fortran command e.g. fortran(expr) to generate the equivalent fortran code but Maxima puts various placement characters so its easier to read the expression interactively when you are in the workspace like in wxMaxima, but these placement characters get automatically saved to file regardless e.g.
 
with_stdout("C:\\fortranfile.f90", fortran(expr));
printfile("C:\\fortranfile.f90");
 
and there are a lot of line breaks so it is a bit dangerous to chop up the file afterwards in a text editor. 
 
Is there an easy way to automatically get rid of these placement characters before the fortran expression in Maxima is saved so that the expression can be used natively in Fortran without too many hassles?
 
Alternatively is there a simple way to make a callable executable function like a dll for a Maxima code snippet that another program can access and use by just providing the values for the input arguments. 
 
Regards,
 
Vishal