473,394 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

zend pdf merge files

Is anyone familiar with Zend Pdf framework and knows how to use it to merge two pdf-files.

Trying to open and merge 2 pdf-files. Gives me the following error.

--------------------------------------------------------------------------------------------
Uncaught exception 'Zend_Pdf_Exception' with message 'Page is attached to one documen, but rendered in context of another
--------------------------------------------------------------------------------------------

<?php
require_once 'Zend/Pdf.php';

$pdf1 = Zend_Pdf::load("1.pdf");
$pdf2 = Zend_Pdf::load("2.pdf");

foreach ($pdf2->pages as $page){
$pdf1->pages[] = $page;
}

$pdf1->save('3.pdf');
?>


Might be some lack of understanding of how pages are "attached" to documents. I though it was just an array, containing page-instances.

Any help appreciated immensely!!
Mar 11 '09 #1
0 3401

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: news | last post by:
I have lines of code that look like this: while ($row2sx = mysql_fetch_array($result2sx)) { Now that's the way I've always learned to create an array from a mySQL querey. I just started...
8
by: Andy Jacobs | last post by:
Evening folks This has probably been asked before so apologies for that. I'm using Dreamweaver for PHP and have been for nearly a year. I've done some stuff that I'm very happy with but I'm...
1
by: Toni | last post by:
I've tried to reinstall the zend environment and debugger on my new computer. I almost succeeded but when I try to debug or profile a webpage by clicking on the buttons on the toolbars I get the...
0
by: writeson | last post by:
Hi all, At work I'm using Zend Studio 3.5.2 to develop PHP files on my Win2K desktop machine. I've got Zend Studio setup with a secure FTP (SFTP) connection to a RedHat Enterprise Linux machine....
1
by: Xristos Nikolopoulos | last post by:
Hello, I have made an application that needs to upload files, the application is deployed in several folders, and each folder has its php files. The problem is, I have in the folder I want to...
4
by: chonny | last post by:
How to connect and query odbc database with zend framework db?
7
by: archimonde2 | last post by:
What are pros any cons to use eaccelerator and zend optimizer on php5-mod with apache2.2 ?? Does accelerators work immediately after install on all php files? When both are in use which...
3
by: Adeel | last post by:
I am new to php. i have installed the PDT all in one package and then i installed the zend debugger plugin for PDT. Every thing is running fine and i am able to debug the single php page using zend...
4
by: Blueparty | last post by:
I am going to use Ioncube or Zend compiler/encoder to deploy PHP5 applications on servers at customers premisses. The factors that affect choice are: - reliability - easy of deployment at...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.