Page 1 of 1

Export blog as PDF doesn't work

Posted: Wed May 21, 2008 5:17 pm
by TKS
My Blog: http://linux-blog.org

I've installed the plugin and the links are present at the end of each entry...but the result in various errors when trying to view the pdf...mainly having to do with Unhandled MIME types. I've seen both text/plain and application/octet-stream errors. Screenshot provided below:

Image

Not sure what the problem is, but no matter what combination I use on the plugin settings page, nothing works.

Any help is appreciated.

One point of contention also...when a person attempts to download the entry...it names the entry doc.pdf. Couldn't this behavior change to use the entry # or first 7-9 letters of the entry? Seems silly to have it be doc for each download.

Re: Export blog as PDF doesn't work

Posted: Thu May 22, 2008 1:50 pm
by garvinhicking
Hi!

IF you download the PDF link and view it with an editor, you will see PHP errors that tell you your /archives directory is not writable to store the PDF. This renders the PDF file invalid.

As for changing the doc.pdf name to something different, that would be good. Sadly I don'T have the time to look into the full API of the fpdf library to see how to change the PDF filename. If someone wants to have a look, I'd happily include the patch that'S required for it.

Regards,
Garvin

Re: Export blog as PDF doesn't work

Posted: Mon Jun 02, 2008 6:02 pm
by gregman
garvinhicking wrote:Hi!
Sadly I don'T have the time to look into the full API of the fpdf library to see how to change the PDF filename. If someone wants to have a look, I'd happily include the patch that'S required for it.
Hi there,

the Output-Function has two parameters: $name for the filename and $dest for the destination ('I' for inline, 'D' for download). So you can call the Function e.g. via

Code: Select all

$this->pdf->Output("my_filename.pdf",'I');
to have the file named "my_filename.pdf" and opened within the browser.

Greg