Image source: HP Inc.

HP (HP 1.85%) and Xerox (XRX) share many similarities. The history of each firm stretches back many decades, and both have played an integral role in shaping the current technology landscape. They both derive significant revenue from the sale of printers and ink. They both pay fairly healthy dividends.

But which company belongs in your portfolio? Let's take a closer look to see which makes for a more attractive investment.

Two companies for the price of one

Xerox will go through a major change later this year. The company, which has three main operating segments, plans to cleave its business in two, creating two smaller companies in the process. Current Xerox shareholders and those investors that become shareholders before the split will receive stock in both companies -- called Xerox and Conduent -- likely by the end of the year. 

The move was driven by activist investor Carl Icahn. Icahn, who has engineered similar splits in the past, will hold board seats at both companies, and investors should be mindful of his involvement. Icahn has had his fair share of failures, but his recent technology track record is strong. eBay shareholders have benefited from the PayPal spinoff he orchestrated back in 2014, as the two companies have collectively outperformed the S&P 500 since they began trading as independent firms.

Conduent will be composed of Xerox's current Business Process Outsourcing segment, while the new, smaller Xerox will be made up of the company's Document Technology and Document Outsourcing segments. Essentially, Xerox will be a company focused on printers; Conduent will be one centered around a variety of administrative services, including HR outsourcing, customer service, and healthcare claims processing.

It's hard to say for certain how the market will value these two firms, but it's possible that Conduent will be given a higher valuation. Xerox's annual revenue has declined in recent years, largely because of falling demand for its document technology and document outsourcing. Business Process Outsourcing revenue has also declined, but not to the same extent. Xerox's total revenue fell nearly 10% from 2013 to 2015, but its Business Process Outsourcing revenue declined only 4%.

But the document business could also have some value. Earlier this month, R.R. Donnelley, a competitor in the space, proposed a merger with Xerox that would've combined its own printing assets with Xerox's. That deal was rejected by Xerox's board, but suggests that the post-split Xerox could make for an attractive acquisition target.

PCs and printers

HP is the byproduct of a similar split, one that the saw the former Hewlett-Packard company break up into two firms. HP Inc. is composed of what was once Hewlett-Packard's PC and printer businesses. HP's PC business brings in more revenue, but printers are more profitable. Last quarter, PCs generated 60% of HP's total sales and 24% of its earnings before taxes; printers were responsible for the balance.

Both businesses are in decline. PC sales fell 10% on an annual basis last quarter, while printing revenue contracted 16%. To reignite growth, HP is looking to 3D printing, new PC designs, and innovative new devices.

At least on Wall Street, 3D printing has lost its luster in recent years, but HP's management views it as an opportunity. "...[W]e're very bullish," said HP CEO Dion Weisler on the company's last earnings call. "We have a long and complex...roadmap. This is not easy to duplicate. We're leveraging more than 5,000 patents from our core; leveraging 30 years of innovation that we've had in our printing business and we're bringing it to bear into a market that really hasn't had a very large mainstream player with a brand that HP has and a reputation that we have."

Earlier this year, HP launched the Spectre, the world's thinnest laptop. It's a premium product, a market segment HP appears to be increasingly focused on. "We grew double digits year-over-year in this profitable segment, while the broader consumer premium market declined," Weisler said. Next month, HP will start selling the Elite x3, a Windows 10-powered smartphone that can double as a laptop.

HP is a cheaper stock, but Xerox might be the better buy

Under most methods of valuation, HP looks like the less expensive stock, with a single-digit price-to-earnings ratio and a greater dividend yield. Xerox still yields a respectable 3.13%, but its trailing price-to-earnings ratio has skyrocketed since it announced its forthcoming split earlier this year. Both companies bring in sizable cash flows -- HP generated $1.5 billion last quarter; Xerox expects to generate between $600 million and $850 million this quarter.

If you're looking for a dividend-paying tech stock to add to your portfolio, both could be attractive, but I would give the edge to Xerox.

With the looming split, there's more uncertainty surrounding Xerox than HP, but its business isn't declining as rapidly. At the same time, it doesn't have to contend with the PC market, which continues to experience regular quarterly declines. In April, research firm IDC reported that PC shipments fell 11.5% in the first quarter. Finally, Icahn's track record and the possibility of an acquisition give Xerox potential for more upside.