Hi I am using free plugin -Kalin's PDF creation station-
It was working fine until i changed some of my content in the post dynamically-Plugin updates pdf only if there is change in post itself OR has recently been updated
What this plugin does is: It generates pdf and saves to folder /wp-content/uploads/kalins-pdf/singles
When new visitor clicks the button : It looks for the file and if the file already exists it simply redirect to that file already generated.
What is want is:
I want it to delete the previous generated file and regenerate new everytime generate button clicked on my website
Here is the page with the button to generate pdf :
http://www.tahititravel.com.au/packages/islands/society-islands/tahiti/manava-suite-resort-tahiti/tahiti-timeout-tahiti-deals/
Plugin link : http://wordpress.org/extend/plugins/kalins-pdf-creation-station/
Dbranes answers:
Hi, if you want to regenerate a new pdf everytime the generate button clicked on a single post, you can
<strong>1)</strong> Try to replace:
if(file_exists($pdfDir .$fileName)){//if the file already exists, simply redirect to that file and we're done
with
if(false && file_exists($pdfDir .$fileName)){//if the file already exists, simply redirect to that file and we're done
in the file <em>kalins_pdf_create.php</em> in line 63.
<strong>2)</strong> To avoid the browser caching the pdf, try to replace
header("Location: " .$pdfURL .$fileName);
with
header("Location: " .$pdfURL .$fileName."?t=".time());
in the file <em>kalins_pdf_create.php</em> in line 432.
<strong>3)</strong> If you want to use shortcodes in the post content, you should check both:
Run other plugin shortcodes, and content filters
in the options page <em>/wp-admin/options-general.php?page=kalins-pdf-admin</em>.
Amit Baral comments:
AWESOME dude!!! I love the codes....