Text this: Megapixel X-ray ghost imaging with a prior-recorded reference