PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old December 21st, 2007, 01:17 PM
hanji hanji is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 3 hanji User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 sec
Reputation Power: 0
More problems with File_PDF

Hello

Making some good headway with File_PDF, but I've come across a problem. Currently, I'm trying to recreate a purchase order invoice. I thought I had it dialed until I carry it across two or more pages.

I'm using a combination of multiCell() and cell() methods to create columns. The problem is when I page break, the the second column (which I setXY) is grabbing the position of the second page vs the beginning of the first page. I thought I'd try to do some math by subtracting page height depending on how many pages, but page one would be 'empty' for that column, but the remainder would show properly on page 2.

I'm hoping there is a easy work around for this (ie: setting page, etc) before the second column work.

Here is an example of what I'm doing:

PHP Code:
// COLUMN 1 Line Items [items]
$x            5;
$y            100;
$width        105;
$p->setY($y);
$p->setFont('arial''B'8);
$p->cell($width,0"Item");
$p->setXY($x,$y 6);
$pageHeight        $p->getPageHeight();
$p->setFont('arial'''8);
for(
$i 0$i 25$i++){
    
$p->multiCell($width,4,"xxxxxxx  / Data Mngr Server Lic/SA",0,'L',0);
    
$p->multiCell($width,4,"xxxxxxx / Data Ent Mgmt Lic/SA",0,'L',0);
    
$p->multiCell($width,4,"xxxxxxx  / Data Std Mgmt Lic/SA",0,'L',0);
}

// COLUMN 2 Line Items [qty]
$x            105;
$y            100;
$width        10;
$p->setXY($x,$y);
$p->setFont('arial''B'8);
$p->cell($width,0," Qty",0,0,'C',0);
$p->setXY($x,$y 6);
$p->setFont('arial'''8);
for(
$i 0$i 25$i++){
    
$p->multiCell($width,4,"9",0,'C',0);
    
$p->setX($x);
    
$p->multiCell($width,4,"80",0,'C',0);
    
$p->setX($x);
    
$p->multiCell($width,4,"120",0,'C',0);
    
$p->setX($x);


So basically 'qty' starts at Y position 100 on page 2 vs 100 position on page 1. If the purchase order does not break the page, then columns look perfect.

Any suggestions are greatly appreciated!!!
hanji

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > More problems with File_PDF


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway