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

  • Home
  • SEARCH
  • 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 596069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:07:54+00:00 2026-05-13T16:07:54+00:00

Currently i can create PDF files from images in Imagick with this function $im->setImageFormat(pdf);

  • 0

Currently i can create PDF files from images in Imagick with this function

$im->setImageFormat("pdf");
$im->writeImage("file.pdf");

And it’s possible to fetch multiple pages with imagick like this

$im = new imagick("file.pdf[0]");
$im2 = new imagick("file.pdf[1]");

But is it possible to save two image objects to two pages?
(example of what i am thinking, its not possible like this)

$im->setImageFormat("pdf");
$im->writeImage("file.pdf[0]");

$im2->setImageFormat("pdf");
$im2->writeImage("file.pdf[1]");
  • 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-13T16:07:55+00:00Added an answer on May 13, 2026 at 4:07 pm

    I know this is long past due, but this result came up when I was trying to do the same thing. Here is how you create a multi-page PDF file in PHP and Imagick.

        $images = array(
        'page_1.png',
        'page_2.png'
    );
    $pdf = new Imagick($images);
    $pdf->setImageFormat('pdf');
    if (!$pdf->writeImages('combined.pdf', true)) {
        die('Could not write!');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I solve this problem Cannot Create Forms. No MDI forms are currently
I'm working with generating .pdf's from PHP using this library: http://www.fpdf.org/ I am currently
I am trying to create a PDF file of current view. Can anyone please
How Can i create a search for the CCK fields in Drupal? Currently using
Can we create multiple schemas for a particular user? I am currently logged in
How can I find out the currently logged on user then create a text
I'm currently trying to create a desktop like homepage where using can move around
My UsersControllerTest currently fails because I use verify_recaptcha in UsersController#create. How can I write
I can currently use sgml-pretty-print to pretty print an xml file in emacs, but
I need to pre-produce a million or two PDF files from a simple template

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.