Reputation: 435
I have a W3 total cache plugin installed in Wordpress. I have managed to minify CSS and js scripts but I have a PDF generator which generates data from posts. When deactivating the plugin, it can generate PDF but when the plugin is activated it displays in the browser like the image below:
I use fpdf to generate PDF. Below is my code to generate the PDF:
$pdf = new PDF();
// Column headings
$header = array('Lot', 'Estate', 'Suburb', 'Land Size', 'House Name','Package Price','Est. Titles');
// Data loading
$post_data = get_recent_properties();
$pdf->SetFont('Arial','',10);
$pdf->AddPage();
$pdf->SetMargins(5,5,5);
$pdf->BasicTable($header,$post_data);
$pdf->Output();
I also reset W3 total cache settings but still PDF not previewing.
Upvotes: 0
Views: 111
Reputation: 2654
Try to disable (un-check) Enable HTTP (gzip) compression
in Browser cache settings.
Upvotes: 0