Twin-screw extrusion pretreatment has great potential for the development of three-dimensional (3D) printed food as dysphagia diets. This study aimed to investigate the effect of twin-screw extrusion pretreatment on starch structure, rheological properties and 3D printing accuracy of whole potato flour and its application in dysphagia diets. The results indicated that twin-screw extrusion pretreatment was found to change chain length distributions, short-range ordered structure and relative crystallinity of whole potato flour (WPF), thereby improving its 3D printing performance. With the increasing proportion of long linear chains (DP > 12), the intensity of hydrogen bonds, linear viscoelastic region, storage modulus (G′), loss modulus (G″), viscosity and n of whole potato flour paste were increased, enhancing high printing accuracy and shape retention of 3D printed samples with a denser microstructure and smaller pore diameter distribution. The whole potato flour paste extruded with a peristaltic pump speed at 5.25 mL/min (WPF-4) displayed the highest printing accuracy with excellent rheological properties, good water distribution state and dense network structure, which classified as class 5 level dysphagia diets. This research provides an effective guidance for the modification of whole potato flour using twin-screw extrusion pretreatment as 3D printed food inks for dysphagia patients.