How to create an offline PDF document?