HP Inc. are gaining ground in after-hours trading Thursday on better-than-expected financial results for the PC and printer company’s fiscal second quarter ended April 30.

For the quarter, HP Inc. posted revenue of $14.0 billion, up 0.2% from the year-earlier quarter, and about in line with Street expectations. Non-GAAP profits were 53 cents a share, at the top of the company’s forecast range of 50 cents to 53 cents, two cents above the Street consensus of 51 cents, and up from 48 cents a year earlier. On a GAAP basis, profits were 51 cents a share, down from 64 cents a year earlier.

For the fiscal third quarter, HP is projecting non-GAAP profits of 53 cents to 56 cents a share; the Street consensus has been 55 cents. For the full fiscal year ending in October, the company is now projecting non-GAAP profits of $2.14 to $2.21 a share, adjusting the range from previous guidance of $2.12 to $2.22 a share.

HP said revenue at its Personal Systems segment, mostly PCs, were up 2% in the quarter, or 5% on a constant currency basis. While commercial revenue was up 7%, consumer revenue was off 9%. Total units were down 1%, with notebooks off 5% and desktops up 6%.

Printing revenue was off 2% year over year, with hardware units off 4%, including a 3% drop in commercial hardware and a 4% dip in consumer hardware. Supplies revenue was off 3%.

“We delivered solid Q2 financial results, with strong non-GAAP EPS growing double-digits and coming in at the high end of our outlook,” HP CEO Dion Weisler said in a statement. “We continue to strike the right balance between driving results today and investing in innovation to deliver long term financial performance.”