A general method based on a limit theorem for generation of random numbers from infinitely divisible distributions with essentially given Lévy measure is studied. Some classes of infinitely divisible distributions that appear in a natural way in this context are paid particular attention.