The American printing and software company has agreed to be sold for $3.6 billion to a group led by Apex Technology of China and PAG Asia Capital.