HP Inc has posted quarterly earnings above analysts' estimates as higher sales of personal computers and workstations helped counter weakness in its printer business. 

Revenue from its personal systems unit, which makes notebooks and laptops, rose 3.6% to $10.43 billion in the fourth quarter, beating estimates of $10.29 billion. 

HP is the second-biggest PC maker after China's Lenovo Group, with a 23.8% share of the market, according to data from research firm IDC. 

The company's upbeat results come as it tries to fend off a $33.5 billion takeover bid from Xerox. 

Earlier, Xerox said it was planning to take its bid hostile after the personal computer maker refused to open its books for due diligence before a deadline. 

HP said that sales from its printer division fell 6% to $4.98 billion. 

Total revenue rose marginally to $15.41 billion, above analysts' expectations of $15.25 billion, according to IBES data from Refinitiv. 

Its net income fell to $388m, or 26 cents per share, in the quarter ended October 31 from $1.45 billion, or 91 cents per share, a year earlier. 

Excluding items, HP earned 60 cents per share, above the average analyst estimate of 58 cents.