Sample preparation methods for the analysis of pharmaceutical materials