Long-term placement of non-degradable silicone rubber pancreatic duct stents in the body is likely to cause inflammation and injury. Therefore, it is necessary to develop degradable and biocompatible stents to replace silicone rubber tubes as pancreatic duct stents. The purpose of our research was to verify the feasibility and biological safety of extrusion-based 3D printed radiopaque chitosan (CS) ducts for pancreaticojejunostomy. Chitosan-barium sulfate (CS-Ba) ducts with different molecular weights (low-, medium-, and high-molecular weight CS-Ba: LCS-Ba, MCS-Ba, and HCS-Ba, respectively) were soaked in vitro in simulated pancreatic juice (SPJ) (pH 8.0) with or without pancreatin for 16 weeks. Changes in their weight, water absorption rate and mechanical properties were tested regularly. The biocompatibility, degradation and radiopaque performance were verified by in vivo and in vitro experiments. The results showed that CS-Ba ducts prepared by this method had regular compact structures and good molding effects. In addition, the lower the molecular weight of the CS-Ba ducts was, the faster the degradation rate was. Extrusion-based 3D-printed CS-Ba ducts have mechanical properties that match those of soft tissue, good biocompatibility and radioopacity. In vitro studies have also shown that CS-Ba ducts can promote the growth of fibroblasts. These stents have great potential for use in pancreatic duct stent applications in the future.