Gannett Co. (GCI) swung to a second-quarter profit amid aggressive cost cuts, but operating results at the nation's largest newspaper publisher continued to weaken sharply.

The company's earnings results significantly beat expectations on Wall Street on Wednesday, propelling its shares to double-digit percentage gains. However, its top-line results came in lower than forecasts, and the company's overall valuation remains just a quarter of what it was a year ago.

"They did a great job at managing expenses, but the core business is still pretty weak," said Ed Atorino, analyst at Benchmark Co.

Gannett has been aggressively cutting costs in the past year or so, and earlier this month, it signaled more was needed. The company 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, had already 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, noted that the company's second-quarter ad revenue from its beleaguered publishing business compared more favorably with last year than its first-quarter results. She also said its June results showed the best year-over-year comparison so far this year.

"That may mean we're at the beginning of a bottoming out for the ad market," Atorino said.

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, which resulted from a big write-down. Excluding items, per-share earnings slumped to 46 cents from $1.04 but easily beat the average analyst estimate of 36 cents.

The better-than-expected earnings lifted Gannett shares 19% to $4.15. The stock, though, remains well below its 52-week high of $21.68 from last August and the $8 mark where it started 2009.

Revenue decreased 18% to $1.41 billion but fell short of the Thomson Reuters estimate of $1.46 billion.

Print revenue dropped 26%, while broadcasting reported a 21% decline. Retransmission revenue at its broadcast business, which comes from carriage fees paid to it by pay-TV distributors, tripled and helped to offset the weak auto advertising demand and lower political spending that is plaguing local broadcasters across the country.

Gannett's closely watched digital business posted a 84% gain in pro forma operating profits after the consolidation of CareerBuilder and ShopLocal, but the gain came largely from a 25% decline in operating expenses. Operating revenue for the segment fell 18.5% on a pro forma basis.

-By Nat Worden, Dow Jones Newswires; (212) 416-2472; nat.worden@dowjones.com

(Tess Stynes contributed to this story)