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 6964281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:54:18+00:00 2026-05-27T15:54:18+00:00

This is not an attempt to join separate PDFs to one single PDF with

  • 0

This is not an attempt to join separate PDFs to one single PDF with multiple pages. It is an attempt to create a single page PDF from few other PDFs that already exists. I need to do this using PHP and the server is CentOS.

I am already generating a set of single page PDF files based on individual templates (Using FPDF). The requirement is to allow the user to mix and match existing PDF files and position them together to create a single PDF.

join multiple PDFs using dynamic positions to single page PDF

My current attempt is to convert the PDFs to images (using ghostscript) and use the output jpegs to create the final PDF using FPDF. While this is possible, the quality of the PDF is compromised a little during conversion.

I would like to know if there is a better solution that we can use?

UPDATE

The solution doesn’t have to be PHP. It most probably wont be. I’m certainly up for any commandline tool that can do the job. Example command would be as follows:

$ newtool -o outfile.pdf -s WidthXHeight -i in1.pdf in2.pdf in2.pdf -g p1Xp2 p3Xp4 p5Xp6

Above is an example only – not a real command – I just wish if a tool has that kind of functionality. Specify set of input files and their positions on the output file.

  • 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-27T15:54:19+00:00Added an answer on May 27, 2026 at 3:54 pm

    I’ve done this in the past with a combination of Ghostscript (to position an existing PDF page on a larger empty PDF page) and pdftk (to overlay/merge two equally-sized PDF pages into a new one).

    Have a look at these answers (@Superuser.com) to get an idea how this works:

    • Convert PDF 2 sides per page to 1 side per page
    • Using Ghostscript to convert multi-page PDF into single JPG?
    • Freeware to split a pdf’s pages down the middle?

    My procedure uses commandline and/or scripts. However, this could also be extended to do it programmatically from PHP with the Ghostscript .dll/.so

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

Sidebar

Related Questions

I've decided to take the advice in this question: create-excel-chart-programmatically-in-php and NOT attempt to
Why does this attempt at creating a list of curried functions not work? def
If I join table A to table B like this... select A.* from A
Sorry for this not being a real question, but Sometime back i remember seeing
I ask this not to start anything negative. Rather, after looking at ASP.NET MVC
why is this not ok? aContract = function(){}; aContract.prototype = { someFunction: function() {
Why does this not work? Do I not understand delegate covariance correctly? public delegate
So why is this not working? I'm creating a regex that will match a
Under what circumstances would this or would this not be safe? I have a
I've done this before with inputs, why on earth does this not work? http://euroworker.no/user/checkout

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.