HP Inc, which was created through the breakup of Hewlett-Packard, reported better-than-expected quarterly revenue, boosted by a stabilizing PC market and a recovery in its printer business.
Shares of the company (hpq) rose 6.4% to $20.23 after the bell on Wednesday.
The company's personal systems, which includes notebooks and desktops, and print business grew in the same quarter for the first time since 2010, Chief Executive Dion Weisler said in a statement on Wednesday.
Revenue from personal systems business jumped 9.6% to $7.66 billion in the second quarter ended April 30.
Worldwide shipments of PCs rose for the first time in five years in the first quarter of 2017, with HP taking the top spot, according to research firm IDC.
For more about electronics, watch:
The PC market has benefited as businesses replace or upgrade their older systems as part of their refresh cycle.
Revenue from the company's printer and copier business rose 2.3% to $4.74 billion, its first rise in at least a year.
However, the company's net earnings from continuing operations fell to $559 million, or 33 cents per share, in the latest quarter from $660 million, or 38 cents per share, a year earlier.
Get Data Sheet, Fortune’s technology newsletter.
Excluding items, the company earned 40 cents per share.
Net revenue rose about 7% to $12.39 billion.
Analysts on average were expecting adjusted earnings of 39 cents per share and revenue of $11.94 billion, according to Thomson Reuters I/B/E/S.
Up to Wednesday's close, shares of the Palo Alto, California-based company had risen 28.1% this year.