Ask your WordPress questions! Pay money and get answers fast! (more info)

Kalin's PDF creation station WordPress


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 :

Plugin link :

Answers (1)


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


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);


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....