This might not solve the problem, but what you’re currently doing looks unnecessarily convoluted (ajax request, fake link, serve PDF via link click etc.)
Why not just a link styled as a button…
<a class="button" href="<?= admin_url( 'admin-post.php?action=wpse_212972_pdf' ) ?>">Download</a>
…and then serve the PDF as a download directly from the server (using WP’s generic POST/GET handler admin-post.php
):
function wpse_212972_pdf() {
$pdf = new FPDF('p','mm','a4');
$pdf->SetFont('arial','b',14);
$pdf->AddPage();
$pdf->Cell(40,10,'Referrer URL',1,0,'C');
$pdf->Cell(40,10,'User IP Address',1,0,'C');
$pdf->Cell(40,10,'User Agent',1,0,'C');
$pdf->Cell(40,10,'Browser',1,0,'C');
$pdf->Cell(40,10,'OS',1,0,'C');
// http://www.fpdf.org/en/doc/output.htm
$pdf->Output( 'D', 'tracked_info.pdf' );
exit;
}
add_action( 'admin_post_wpse_212972_pdf', 'wpse_212972_pdf' );
// Non-logged-in users (remove if not required)
add_action( 'admin_post_nopriv_wpse_212972_pdf', 'wpse_212972_pdf' );