PDF design

Please report bugs here!

Moderator: Thorsten

Post Reply
Markus-SSI
Posts: 35
Joined: Thu Aug 20, 2009 8:34 am

PDF design

Post by Markus-SSI »

After updating from V2.5.3 to V2.6.2 there is another PDF service used, so I have to correct my PDF design which I have been using till now.
How can I add an image to the header of the PDF, so that the export from the admin panel and saving as PDF from the article page works?

I have added the image in \inc\PMF_Export\Pdf\wrapper.php:

Code: Select all

public function Header()
    {
        $title            = $this->categories[$this->category]['name'].': '.$this->question;
        $currentTextColor = $this->TextColor;
        $this->SetTextColor(0,0,0);
        $this->SetFont('arialunicid0', 'B', 18);
	$this->Image('../images/ssipdf.PNG', 0, 12, 210, 10); //Added; works for the export but not at the articles page
	$this->MultiCell(0, 9, $title, 'B', 'C', 0); //Changed: Bottom Line added
        if ($this->enableBookmarks) {
            $this->Bookmark(PMF_Utils::makeShorterText($this->question, 5));
        }
        
        $this->TextColor = $currentTextColor;
    }
It works for the export but not at the article's page. At the article's page you get the error: file doesn't start with "%pdf-"

In the PDF file from the article's page there is the URL included, but not in the exported PDF.

Help would be appreciated!
kind regards
Markus
- phpMyFAQ 2.6.2
Thorsten
Posts: 15568
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: PDF design

Post by Thorsten »

Hi,

you should try the absolute path.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Markus-SSI
Posts: 35
Joined: Thu Aug 20, 2009 8:34 am

Re: PDF design

Post by Markus-SSI »

Thanks, now it works :D
kind regards
Markus
- phpMyFAQ 2.6.2
Post Reply