You'll also need to prevent z-axis movements. You can do this with a simple search-and-replace on the g-code file, although you might want to keep the z-axis movements for getting to the initial position of the extruder. You could also turn on z-lift and set it to a couple of mm, so that the writing implement lifts off the paper for non-extrusion moves.