Factored out PDF helpers and text operators