For changing the text structure to match the paper structure you could use uv maps.
In case you are using pure python then you can predict the uv map using some model.
On the other hand if you are using blender you can extract very useful details like uv map, depth map, and light map.
Then using the uv map you can warp your receipt in pure python (faster than rendering a full dataset) and apply the light map with numpy and opencv.
Hope my answer was usefull.