I had declined both of them as they only offered 10% royalty rates.
I didn't have to pay for editing. I did everything myself: writing, diagrams, proofreading, marketing.
In fact, I decided to self-publish it after reading this article from Antonio Goncalves about his Java EE 7 book:
https://antoniogoncalves.org/2014/09/16/the-uncensored-java-...