Lexmark International Inc. is buying two smaller companies for a total of $31.5 million as part of its effort to reverse a slump brought on by waning demand for computer prints and ink.

The deals announced Tuesday mark Lexmark's seventh and eighth acquisitions during the past three years. The shopping spree has cost the Lexington, Ky., company more than $610 million so far.

Lexmark's newest additions are Twistage, a New York company that sells tools for managing video, photos and audio on the Internet and mobile devices. The growth of digital media that can be reached on any Internet-connected device is one of the reasons that people are using computer printers less frequently.

Lexmark also is buying AccessVia, a Seattle company that makes software used by retailers to place signs and labels in their stores. AccessVia's technology is being used by more than 75 retailers, including Best Buy Co., Safeway Inc., Office Depot Inc. and Family Dollar Stores Inc.

The two deals mark another step in Lexmark's "transition from being hardware-focused to being a leading end-to-end solutions provider," company CEO Paul Rooke said in a statement.

The adjustment has proven traumatic. After its stock fell to a 15-year low last summer, Lexmark announced plans to stop selling inkjet printers and focus instead on laser printers.

To cut costs, Lexmark last year began laying off more than 2,300 workers, including 1,100 people in its manufacturing plants.

The turmoil contributed to a 67 percent drop in Lexmark's earnings last year to $106 million. The company's revenue slid by 9 percent last year to $3.8 billion.

Lexmark's stock gained 37 cents to $22.81 in early afternoon trading.