Merge And Split PDF In PHP Using PDFtk

Merge And Split PDF In PHP Using PDFtk
Social sharing

Merge a group of PDF files to a single PDF file without disturbing the contents using PDFtk.

  • PDFtk runs on a variety of platforms, including Windows, Linux, Mac OSX, FreeBSD, and Solaris.
  • It does not require Acrobat and allows you to manipulate PDF easily and freely.

What All You Can Do in PHP Using PDFtk

  • Merge PDF documents to one.
  • Rotate PDF Pages or documents.
  • Split the pages of the PDF into a new document.
  • Encrypt the output as desired.
  • Decrypt the Input as necessary but requires a password
  • Background watermark or a foreground stamp can be applied
  • Report on PDF metrics can be generated such as metadata, bookmarks, and page labels.
  • Update PDF metadata.
  • Attach numerous files to the PDF document.
  • Compress a PDF document into a single page.

Under the GPL, PDFtk is licensed for the public.

Download Link:


You can provide two or more PDF files as arguments to create a single PDF file as output.
Merge two or more PDFs into a new PDF file with all the original contents

  • pdftk example1.pdf example2.pdf example3.pdf cat output result.pdf

Rotate the first page of a PDF to 90 degrees clockwise

  • pdftk in.pdf cat 1E 2-end output out.pdf

Rotate all the pages of the PDF document by 180 degrees

  • pdftk in.pdf cat 1-endS output out.pdf

Report on PDF document metadata, bookmarks and page labels

  • pdftk mydoc.pdf dump_data output report.txt

Your recently viewed posts:

Jayadev Das - Post Author

Do what you do best in – that’s what I’ve always believed in and that’s what I preach. Over the past 25+ years (yup that’s my expertise ‘n’ experience in the Information Technology domain), I’ve been consulting to small, medium and large companies ‘About Web Technologies, Mobile Future as well as on the good-and-bad of tech. Blogger, International Business Advisor, Web Technology Expert, Sales Guru, Startup Mentor, Insurance Sales Portal Expert & a Tennis Player. And top of all – a complete family man!

    Contact Us

    We’d love to help & work with you

    When do you want to start ?

    Enter your email address to stay up to date with the latest news.
    Holler Box

    Orange Exit pop up

    Subscribe for the latest
    trends in web and
    mobile app development
    Holler Box

    Exit pop up

    Sad to see you leaving early...

    From "Aha" to "Oh shit" we are sharing everything on our journey.
    Enter your email address to stay up to date with the latest news.
    Holler Box