Make the PDF downloadable + move code around