Sets a PDF layer object for the text object.
If the smart pointer to a PDF layer object is null, it means that the text object doesn't belong to any layer.