public function PdfLink()
    {
        if (!$this->owner->config()->get('pdf_export')) {
            return false;
        }

        $path = $this->getPdfFilename();

        if ((Versioned::get_stage() === Versioned::LIVE) && file_exists($path)) {
            return Director::baseURL() . preg_replace('#^/#', '', Director::makeRelative($path));
        }
        return $this->owner->Link('downloadpdf');
    }