Gannett Co. (GCI) reversed a prior-year loss in the second quarter caused by $2.8 billion in write-down, but operations results continue to weaken sharply as publishing advertising revenue tumbled 32%.

Still, shares were up 17% at $4.10 in premarket trading as earnings handily topped analysts' expectations and print ads rose from the first quarter. Through Tuesday, the stock was down 56% this year.

Gannett has been aggressively cutting costs in the past year or so. Earlier this month it unveiled plans to cut 1,400 jobs from its work force of 41,500. The company, which owns more than 80 daily newspapers, including USA Today, cut about 10% of its work force last year.

Chief Financial Officer Gracia C. Martore, who is serving as the company's principal executive while Chairman and Chief Executive Craig Dubow is on medical leave, said June was the strongest month so far this year for print ads. At the same time, Gannett's digital business saw strong revenue gains owing to the consolidation of this CareerBuilder and ShopLocal units.

The company reported a profit of $70.5 million, or 30 cents a share, compared with a prior-year loss of $2.29 billion, or $10.03 a share. Excluding items, earnings slumped to 46 cents from $1.04. Revenue decreased 18% to $1.41 billion.

Analysts polled by Thomson Reuters most recently were looking for earnings of 36 cents on revenue of $1.46 billion.

Print revenue dropped 26% while broadcasting reported a 21% decline.

-By Tess Stynes, Dow Jones Newswires; 212-416-2481; tess.stynes@dowjones.com