I see an app written in raw php without any framework. The reports generated with FPDF in a module are working fine, except that the PDF cache is done. Original sound of Generation Routine
& lt; A href = "tr_inci_print.php" target = "_new" & gt; Print & lt; / A & gt; tr_inci_print.php Uses 2 parameters stored in the session, year and month. I received the code
& lt; A href = "tr_inci_print.php? Anio = & lt ;? php echo $ anio;? & Gt; mes = & lt ;? php has changed into echo $ mess;? & Gt; target =" _new "> Imprimir which resolves the problem partly by changing the URI in every month, but if the data changes externally and the browser is still There is also no updated PDF from retrieving the link if it is also in the original page.
Is there any way to convert $ FPDF-> Output () to PDF to non-cacheable?
------ partial solution -------------------
The following OZee answered, changed: $ oPdf-> Output Output ('', 'S'); Header ('Content-Type: $'), with the exception of $ buffer = $ oPdf-> Header ('content-length:' .restion ($ buffer)) header ('content-presentation: inline; filename =' doc pdf ''); header ("cache-control: no-cache , Must-modify, maximum-age = 1 "); // HTTP / 1.1 header (" End: Saturn, 26 July 1997 05:00:00 GMT "); // Date in the previous header ('PGG: Public A '); Ini_set ('zlib.output_compression', '0'); Buffer $ buffer;
That solved the problem in Chrome and IE, but not in Firefox 4. You just have to set a header to get it, just type your tr_inci_print.php / Code>: header ("cache-control: no-cache, must-modify"); // HTTP / 1.1 header ("End: Saturn, 26 July 1997 05:00:00 GMT"); // any date edit: please before calling output ()
Comments
Post a Comment