Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

FPDF PDF Generator Help

Posted on 2010-08-25
2
Medium Priority
?
440 Views
Last Modified: 2013-12-13
I am using FPDF to automatically create a PDF.

http://www.fpdf.org/

I need to do the following.

Get the Y axis coordinate then if the position is more than 200mm from the top of the page, add a new page.

$pdf->AddPage();

Can you please help me write this code? Thanks
0
Comment
Question by:petewinter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
mugane earned 2000 total points
ID: 33521980

require('fpdf.php');
$pdf=new FPDF('P','mm','letter'); // instantiate with units=mm, paper size=letter (use 'A4' if non-US)
$pdf->AddPage();

// ... your content/loop/whatever here ...
if($pdf->GetY()>200)$pdf->AddPage(); // add page if Y>20cm from top left corner

$pdf->Output();

Open in new window

0
 

Author Closing Comment

by:petewinter
ID: 33522609
Perfect. Many thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question