added PDF attachment functionality