Move IText sag exporting logic to its own file