sargent240
asked on
Java String.format problem
I include the form feed code \f at the end of my format string but is does not form feed to the next page before it starts printing the balance of the document. Any Ideas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks objects: I moved the \f to follow the %.2f with the same results.
have you checked if the form feed is actually in the string?
Problem may not be with that line of code
Problem may not be with that line of code
ASKER
I write several invoices into a file and I would like each invoice to be on it's own page of course. I am printing all the invoices to one file and trying to put a form feed between each one. I am attaching the code I am using and the line you suggested is toward the bottom. Everything prints properly I am only lacking the form feed. Hope this helps.
Cheers
WriteFile.java
Cheers
WriteFile.java
are you sure your printer supports form feeds?
ASKER
I have tried it on a Brother DCP 7020 and an Okidata 320 using the Epson FX emulation. They both react the same. We have several hundred Okidata printers in another application and we use the form feed there. I'm not curtain about the Brother and am not sure how to find the info.
ASKER
Are we at a lose on this one.
Cheers sargent240
Cheers sargent240
the code is writing the form feed to the string so I'm stuck as to why its not working
ASKER
Are you aware of the two printers I have tried?
Thanks
Thanks
i'm not sorry
ASKER
totaloutputString = String.format("\n%62s %.2f", "Total Due",
stmtTotal, "\f");