Solved

FPDF PDF Generator Help

Posted on 2010-08-25
2
430 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses four methods for overlaying images in a container on a web page
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

752 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