Commodore Hornblower, (or The Commodore, as it is known in Great Britain) was written by C.S. Forester. The novel recounts the adventures of Royal Navy Captain Horatio Hornblower in the Baltic Rim during the latter-portion of the Napoleonic Wars. Hornblower, of course, was the basis of the protagonist of Gene Roddenberry's initial proposal for Star Trek.
The section of text seen in the episodes is from Chapter 1 of the novel. It is not an exact copy of the text, as some of the text has been altered for its appearance on the PADD.