function to join pdfs