473,657 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8174
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
5028
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
2653
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 it differently. FOUR QUESTIONS: The background: I got three (3) files
3
3076
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 before rowID answID qryrow questionID datafield 1591 12 06e 06e 06e question 1593 12 06f 06f 06f question 1594 12 answer to the question 06f
10
3418
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 database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in php with an ASP alternative. However, after doing many searches on google and reading a couple...
10
3710
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 Error in '/QuickStartv20' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file
0
3096
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 'class.ezpdf.php';
2
10145
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
5009
by: dsbsolutions | last post by:
Hi, is there a way to insert a graphic image into a table created with ezpdf? Thanks, Mike
0
1807
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
8421
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8325
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8742
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8621
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6177
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.