There is a history of 2 guys and one woman. The woman gets with the wrong guy, so the other guy buys an old printing company in order to create what looks like an old novel that tells the story so that it can be planted in second hand bookshops and eventually will be discovered as the “source” of the story and the other guy will be discredited. I thought it starred David Niven, but I cannot find any of his films that have this kind of storyline. It may have been a british film set in the UK, with scenes in persia or africa. Not sure. I saw it on TV about 40 years ago and it was an old film then.