473,408 Members | 1,730 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,408 software developers and data experts.

ezPDF Question


This may or may not be the correct place to discuss my question; if not,
please direct me.

I am using the ezPDF library to dump the contents of a table into a PDF
with the function:

$pdf->ezTable(array_of_values);

The problem is that if the array is too large, it bleeds onto the next
page. This would be fine, but I created custom headers and footers that
appear on each page, but sometimes are covered up by the table, if that
makes any sense. The question, then, is whether or not it is posible to
automatically set the table to paginate upon reaching a certain size
(thereby not covering up the header and footer) or if I must determine the
size myself and create multiple tables.

Thanks for any help.
Nov 30 '06 #1
4 8154
You could "hack" the function ezNewPage() (search in the source code) by
adding at the end a call to a function defined by yourself where you a) draw
the header/footer of the page and b) set the page's margins and vertical
start position as required (ezSetCmMargins(), ezSetY()). I've done this and
it works in general, but I haven't tested this with tables.

Greetings,
Thomas
Nov 30 '06 #2
If you know how many records will fit on the page, you could break the
array into say 25 lines and then dump each array out through the ezPDF
function with the headers and footers.

You should be able to find lots of examples of pagination for
displaying data sets in html tables and you are only looking at the
same process but a different output destination.

If you don't know how many lines you can fit on the page (e.g. you may
have cells with word wrap in them) then you will need to do something a
bit more clever and built the array one line at a time and estimate how
far down the page you are

Obiron

Dec 1 '06 #3
Having read your post again, here's another thought of mine:

You can set margins for your pages which should be respected by the table
generating function. You should set these margins so that your header and
footer fit within the margins and are therefore outside the main canvas
area. There are functions in the base class like addText() which allow you
to write outside the margins.

Greetings,
Thomas
Dec 1 '06 #4
In a contingent reality, Thomas Mlynarczyk possibly said:
Having read your post again, here's another thought of mine:

You can set margins for your pages which should be respected by the table
generating function. You should set these margins so that your header and
footer fit within the margins and are therefore outside the main canvas
area. There are functions in the base class like addText() which allow you
to write outside the margins.
The margins were the magic bullet. Didn't have to hack anything, or
rewrite my functions to count lines, etc.

Thanks for the help.
Dec 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
0
by: Sonnich | last post by:
hi all! I am using azpdf as follows and I'd like to have a header on each page, as below. The page number is there, but how do I get the logo there every time? BR Sonnich include...
2
by: Sonnich | last post by:
hi all! I use ezPDF like this $pdf = new Cezpdf('a4','potrait'); $tmp = array( 'b'=>'Courier-Bold.AFM', 'i'=>'Courier-Oblique.AFM', 'bi'=>'Courier-BoldOblique.AFM',
1
by: dsbsolutions | last post by:
Hi, is there a way to insert a graphic image into a table created with ezpdf? Thanks, Mike
0
by: yumi ice | last post by:
Hi all, I'm a new bie on ezpdf.I have been trying to create a custom header that appear on each page but to no avail. Can someone please guide me. Thanks a lot!
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.