Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3490064
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:28:15+00:00 2026-05-18T11:28:15+00:00

I am using Dompdf to generate A5 pdf documents from a html template and

  • 0

I am using Dompdf to generate A5 pdf documents from a html template and Pdfnup (Part of Pdfjam) to combine them into a nice single A4 sheet, which helps saving some paper when printing 🙂

# Generate an a5 pdf 
php dompdf.php mytemplate.html -p 'A5' -f a5doc.pdf

# combine two copies of the generated A5 into a single A4 page
pdfnup a5doc.pdf a5doc.pdf --nup '2x1' 

This works just fine; though the second step forces me to install a huge amount of dependencies (i.e. Tex-Latex, pdftex, ecc.) and would clutter my production server. I am wondering if is there any way to combine the generated documents without actually using Pdfnup. For example, is there any way of doing this with pdftk?

Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:28:16+00:00Added an answer on May 18, 2026 at 11:28 am

    You can do it with a combination of Ghostscript and pdftk.

    Here’s how: https://superuser.com/questions/191373/linux-based-tool-to-chop-pdfs-into-multiple-pages/192293#192293 .

    The above linked example shows how to split pages into half. Just modify the steps accordingly, using different parameters to…

    • …first move “left” pages to a double-sized canvas, left half;
    • …then move “right” pages to a double-sized canvas, right half;
    • …last, combine the pages with pdftk.

    Update:

    Hint: You’d want to use either of pdftk’s multistamp or multibackground operations (NOT: its shuffle operation!) to get the wanted final result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm using dompdf library to render some html content into pdf files. I actually
I'm using the dompdf HTML to PDF converter to dynamically generate PDF files based
I'm using DOMPDF to generate about 500 reports from one script. It's running out
How do I properly use dompdf to convert html files into pdf. I'm doing
I'm using DOMPDF to generate PDFs inside of a symfony application. On my current
I have a method that returns a PDF file using DOMPDF . It sends
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
I am using the DOMPDF library to create an invoice in PDF. This document
Edit: I am using domPDF 0.5.1, hosted http://code.google.com/p/dompdf/ I am using HTML table to
i am using dompdf as a plugin in codeigniter. it generates the pdf perfectly.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.