HP Inc. (NYSE: HPQ) sees its future in copiers and printers. The personal-computer maker has agreed to buy Samsung Electronics Co.’s printer business for $1.05 billion, betting that it can grab share and generate income, even in a shrinking global market.

The deal will add to earnings in the first full year, Palo Alto, California-based HP said in a statement. As part of the agreement, Samsung has committed to buy $100 million to $300 million worth of HP shares on the open market after the acquisition closes, the companies said.

The merger opens up a path for HP to focus more on the copier market and get its hands on key laser-printing technology. It’s also part of a bigger plan by the company to expand its portfolio beyond its well-known line of printers and find new sources of growth as smartphones, tablets and other digital devices reduce the need for traditional paper printing. The acquisition is the biggest since HP split from Hewlett Packard Enterprise Co. in 2015 to focus on personal computers and related hardware.

“This is a major strategic move for HP,” Enrique Lores, president of Imaging, Printing & Solutions at HP, said on a conference call. “The separation is really working.”

Still, revenue in HP’s printing division fell 14 percent to $4.42 billion in the latest quarter, while total sales fell about 4 percent to $11.9 billion. When the company reported earnings last month, it said restructuring activities were on track for the fiscal year, including about 3,000 job cuts. HP has a small presence in the office copier market, which is dominated by the likes of Xerox Corp.

For Suwon, South Korea-based Samsung, the divestment is part of a longer-term push to focus on more high-growth areas.

“The sale of printers makes perfect sense because the world of paper is going away,” said Mark Newman, an analyst at Sanford C. Bernstein in Hong Kong. “Printers don’t have much future. It’s all going to be screens and Samsung is the biggest display maker in the world.”

The printer deal is expected to close in about 12 months and is subject to approvals, the companies said. HP will receive more than 6,500 patents from Samsung, Lores said, adding to its intellectual-property lineup. Samsung’s laser capabilities are more suited for the large copiers that are built for heavy use at company offices. HP relies on Canon Inc. for key laser technology in some of its printers.

Deal activity in the printing sector is picking up. Earlier this year, Lexmark International Inc. agreed to be acquired by an investment consortium led by Apex Technology Co. and PAG Asia Capital in a transaction that values the company at $3.6 billion.