In 1776, Dunlap secured a lucrative printing contract for the Continental Congress. In July 1776, fighting between the American colonists and the British forces had been going on for nearly a year. On July 2, the Second Continental Congress voted to secede. Two days later, they approved the final wording of a public declaration regarding their decision, which we today call the Declaration of Independence. That evening John Hancock ordered Dunlap to print broadside copies of the declaration. Dunlap printed perhaps 200 broadsides, since known as the Dunlap broadsides, which were the first published versions of the Declaration.
Dunlap also printed items for Pennsylvania's revolutionary government. In 1777 he took over the printing of the Journals of the Continental Congress from Robert Aitken, but lost the contract in 1779 after printing in his newspaper a letter from Thomas Paine that leaked news of the secret French aid to the Americans.
In 1784, Dunlap's paper became a daily with a new title: the North American and United States Gazette. It was not the first daily in the United States—the Pennsylvania Evening Post beat him to the punch in 1783—but it became the first successful daily.