HP said on Sunday that it had turned down a takeover offer from Xerox, rejecting a deal that would have brought together two once-formidable printing companies that have faced business difficulties as demand for printed documents and ink has waned.

The cash-and-stock offer from Xerox “significantly undervalues HP and is not in the best interests of HP shareholders,” company officials wrote in a letter to John Visentin, Xerox’s chief executive.

The letter to Xerox called the proposal “highly conditional and uncertain” and expressed qualms about “the potential impact of outsized debt levels on the combined company’s stock.” It also raised concerns about a recent stark decline in Xerox’s revenue.

But the letter left open the possibility of a merger under different terms. “We recognize the potential benefits of consolidation,” it said, “and we are open to exploring whether there is value to be created for HP shareholders through a potential combination with Xerox.”