# PHP and PDF file manipulation

**URL:** <https://forum.kirupa.com/t/php-and-pdf-file-manipulation/278610>\
**Category:** programming\
**Created:** [January 2, 2009, 3:48pm UTC](https://forum.kirupa.com/t/php-and-pdf-file-manipulation/278610 "2009-01-02T15:48:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvturnage](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@rvturnage](https://forum.kirupa.com/u/rvturnage)\
**Post date:** [January 2, 2009, 3:48pm UTC](https://forum.kirupa.com/t/php-and-pdf-file-manipulation/278610/1 "2009-01-02T15:48:34Z")

</div>

I need some help with PDF’s and PHP…A client first approached me waning the ability for a site visitor to select pages of a website and save them as a single PDF file. I was able to accomplish this relatively easily using sessions and dompdf.

Now I have a new wrinkle. I need a user to be able to choose from a list of existing PDF files on the server and merge them into a single PDF file for download. dompdf doesn’t appear to have this merge/concatenating feature.

I’ve seem reference to pdftk for accomplishing this, but can’t for the life of me understand how to incorporate that with PHP…can anyone help with this problem? Either with pdftk or some other way?

Thanks in advance,  
rvt
