Revert "Simpler link for PDF export"

This reverts commit 26ee3a5449f2684f64eb36146431eab476bcbaa8.
Use window.location.pathname to construct the PDF export URL