Happily, PDFlib and ClipPDF aren't all that far apart when it comes to using the two inside PHP: once you are familiar with PDFlib, it will probably be worth your while investigating whether ClipPDF is better suited to your needs.
One minor drawback to using ClipPDF is that the PHP documentation is much less complete for ClipPDF than it is for PDFlib, which would make learning it much trickier. Have a look over the documentation at http://uk.php.net/manual/en/ref.cpdf.php (or your local mirror) and see what you think.
Want to learn PHP 7?
Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!
If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!