The ongoing advancement of 3D printing technology provides an innovative approach to addressing challenges in disaster relief operations. By utilizing a variety of printing materials, 3D printers can produce essential disaster relief resources needed for disaster relief, effectively satisfying the varied demands that arise after disasters. This paper examines the joint optimization of pre-disaster and post-disaster humanitarian operations. Given the significant unpredictability of natural disasters, we introduce a two-stage distributionally robust optimization model to tackle the uncertainty in the demand for various relief resources. The first stage of the model involves decisions related to pre-disaster facility location, 3D printer deployment, and resource allocation. The second stage model addresses the post-disaster rescue activities, including decisions on the production and transportation decisions of relief resources. To address demand uncertainty, we propose an ambiguity set using the Wasserstein metric and reformulate the two-stage distributionally robust optimization model into a tractable formulation. To solve this problem, we employ a Benders decomposition algorithm with an acceleration strategy. The performance of our proposed model and algorithm is evaluated via a real-world case. Numerical experiments reveal that our distributionally robust optimization model outperforms the benchmark model across various metrics. Additionally, we conduct a series of effect analyses and provide managerial insights for decision-makers involved in disaster relief operations.