writing the initial bakery article! Excellent article. For those that
were interested in knowing what was wrong:
"
you probably still send the layout as shown in the article to the
browser, with
header("Content-type: application/pdf"); This will make your browser
start your PDF viewer, and then you send nothing, because you save to
disk only. Thus the error message of your PDF viewer.
In your case you need neither the layout as shown in this article, nor
the call for it in the controller as shown in this article.
$this->layout = 'pdf'; //this will use the pdf.ctp layout Just take
it off.
The easiest way to get what you want is probably to add in the view,
after your
$tcpdf->Output('filename.pdf', 'F'); a regular cake view code, such as
for a confirmation page saying that the pdf file was saved, or
whatever else you want to display after you saved that pdf.
"
On Aug 1, 8:42 am, Kalileo <cake...@boons.net> wrote:
> You might wanna check the article again, there is a reply to your
> comment.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment