I am using "tcpdf" vendor file in cakephp 2.X but it is not looking good view. I want every html tag convert properly in pdf file. Please help.
I have found the a blog for you. its will be help you to find your problem.
Read the following blog
Generating PDFs with CakePHP
You will be find a link for demostration of different PDF file generator.
May be I help you.
I have built my own plugins in the past using MPDF, they worked for years, kinda slow on some environments. Recently, I switched to WkHtmlToPdf and love it. I built my own plugin then a few weeks later realized that one already existed. I would recommend using this plugin by Friends of Cake: https://github.com/FriendsOfCake/CakePdf
A lot of the contributor for Friends of Cake are also Core CakePHP developers, so its usually very well coded, tested & documented.
This plugin also works with several PDF generation engines, which is a nice touch!
I am using wkhtmltopdf for few years and it's working very good, quality of PDF you can get from a html is very good, I am also using the cakephp for PDF generation.
I am running this command from cakephp controller
shell_exec("/usr/bin/wkhtmltopdf < SOURCE_HTML_PATH/URL > < DESTINATION_PDF_PATH> ");
You can install stable version wkhtmltopdf for your linux distribution from this link
http://wkhtmltopdf.org/downloads.html#stable
Related
I have been upgrading my application from cakephp 3 to cakephp 4. I was using fheider/cakephp-datatables and I have come across ypnos-web/cakephp-datatables where both support cakephp 3.
I am currently looking for a cakephp-datatable plugin which supports cakephp 4.
If anybody has an idea, I would be happy.
Thanks in Advance.
Isn't the built-in pagination is what you are looking for ? you can do advanced dynamic database links with your HTML tables.
I successfully use ypnos-web/cakephp-datatables on CakePHP 4.2.7. It works very well for me.
You might have to play around a bit to get it working correctly. Read some of the issues (open and closed) on the ypnos-web/cakephp-datatables github repository and you can likely get it working.
Good Luck!
I would like to convert my cakephp application to windows desktop application. I tried several solutions including the plugin cakephp "cakedesktop" and "exeoutput for php" which unfortunately do not work properly. I continue to seek without satisfactory results.
I am then back to you, thank you in advance for the solutions that you will propose to me.
PHP Nightrain
Winbinder
wxPHP
TideSDK
PHPDesktop
(First link work with cakephp, laravel, Drupal, Wordpress, ...).
Hope it helps
Is there an easy way to use Coffeescript with CakePHP? Rails has Barista, but I haven't been able to find anything similar for CakePHP. Ideally, something transparent that would compile the coffeescript to javascript on-demand, and only when it has changed.
Google results for CakePHP & Coffeescript turn up a lot of talk over a clash between the cake command, but not much in the way of using them together. Has anyone found anything? Or maybe ideas on how I might implement such a plugin myself?
I know this isn't the answer you're looking for, but I usually handle this with a build script, either in Bash or Rake (yes, Rake, its great for building PHP projects too), which compiles, concats and compresses my .coffee files for production. While in development I use coffee -w to compile the .coffee files on the fly.
You could automate this further by adding a post-commit hook to Git or Subversion if you like.
You should be able to extend Mark Story's Asset Compress plugin to do the compiling on the fly as well.
You may want to look at kohana-coffeescript, which to my knowledge is the only project that does what you want in PHP. Although the project is nominally for the Kohana framework, it should be fairly easy to fork it and adapt it to CakePHP.
There used to be, but there don't seem to be any direct links. A little digging around revealed some answers which I thought it would be useful to share.
These are links to the manual in one page - useful for offline
use or creating a PDF using Dardo Sordi Bogado's build script.
1.2 Manual in one page
https://web.archive.org/web/20120730003805/http://book.cakephp.org/complete/3/The-Manual
1.3 Manual in one page
https://web.archive.org/web/20120730004040/http://book.cakephp.org/complete/876/The-Manual
GOOGLE DOCS - CakePHP 1.3 Manual
You can download CakePHP's manual from their website:
http://book.cakephp.org/2.0/en/
In the welcome section you will find two download links :
Download the documentation:
epub format = http://book.cakephp.org/2.0/_downloads/en/CakePHPCookbook.epub
original source = https://github.com/cakephp/docs
There is no 'right' answer to my question, but the discussion has proved to be very useful.
As CakePHP now publish 'offline-able' manuals on their website for 2.x http://book.cakephp.org/2.0/en/index.html this thread is effectively redundant.
take my work: http://sourceforge.net/projects/cakephp-doc/files/
I've used gotAPI in the past but it doesn't work if the API goes offline and doesn't cover the Cookbook.
I usually just refer people to the "All in one page" Cookbook links you mentioned as these can be saved as HTML or printed to PDF.
The main issue I've heard in the past about offline copies of the Cookbook is that the content is copyrighted to the CSF, but - looking now - the content seems to be licensed for non-commercial sharing under a creative commons license. (IANAL though.)
cakephp 1.3 offline docs as a zipped, google ads stripped off html http://www.4shared.com/zip/QbLIpxwC/Cake13_-html_docs.html .
For learning Basic Cakephp 2.X version offline
http://book.cakephp.org/2.0/_downloads/en/CakePHPCookbook.pdf
and For Advance CakePHP Tips on coding side you can download a manual from below link
http://www.pseudocoder.com/Super_Awesome_Advanced_CakePHP_Tips.pdf
i hope it will give you best guideline in CakePHP
I am trying to follow Pete Brown's introductory WPF tutorial which makes use of the TweetSharp libraries to interact with Twitter.
I have downloaded what appears to be the latest TweetSharp binaries (and a few others including the ReleaseCandidate) from Codeplex (http://tweetsharp.codeplex.com/).
No matter what references I add and no matter what using statements I try, I cannot create a reference to the TwitterService for the FluentTwitter class.
I simply get the compiler error - "The type or namespace cannot be found".
Now I've noticed that the TweetSharp.dll that Pete references is 518KB but the one contained in each of my different downloads is only 84kb. (I've tried several times - I am getting the full download here).
The link from Pete's article to the TweetSharp libraries, no longer works (http://code.google.com/p/tweetsharp/).
What basic element am I missing here or what could I be doing wrong?
TweetSharp moved to CodePlex since that article was posted, which is why the link to Google Code is dead.
You need references to TweetSharp.dll, TweetSharp.Twitter.dll, (and for good measure Hammock.dll, and Newtonsoft.json.dll).
For using directives, if you're using the FluentTwitter approach:
using TweetSharp.Twitter.Fluent;
using TweetSharp.Twitter.Extensions;
using TweetSharp.Twitter.Model;
If you're using the TwitterService approach:
using TweetSharp.Twitter.Model;
using TweetSharp.Twitter.Service;
There are some other examples kicking around on CodePlex including some starter apps if you download the source code.
I think now it's in github https://github.com/danielcrenna/tweetsharp CodePlex didn't work for me?
Is the Tweetsharp library still on Codeplex? The link above has expired?
Or is Linq to Twitter a better option? I'm new to Twitter API and only need a few simple code examples (Search Feed, Geo Location & Post Photo to Twitter).