Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7615325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:37:08+00:00 2026-05-31T02:37:08+00:00

this is the snippet of my code in which i am trying to generate

  • 0

this is the snippet of my code in which i am trying to generate pdf when their is 1 value in the array e.g

"$arrIds = array('10'); ". 

My code generates the pdf, but when there are more values in the array i am unable to see the next pages.

  function action_pdf_reportPt10()
{
    $arrIds = array('10', '5', '12', '31');
    foreach ($arrIds as $id)
    {
        $this->_Pt10_Calculations->setPropertyId($id);
        $this->_FpdfGenerator = new Fpdf('L');
        $pt10values = $this->_Pt10_Calculations->fetch_record_by_property_id();


        $this->generate_pt10($pt10values);

    }

    $this->load->view('admin/property/report_pt10', $this->view_data);
}

And

 public function generate_pt10($pt10values)
{
    $tax_amount = round(@$pt10values[0]['tax_amount']);

    $self_rented = @$pt10values[0]['self_rent'];
    switch ($self_rented)
    {
        case '1':
            $self_rented = 'Self';
            break;
        case '2':
            $self_rented = 'Rented';
            break;
        case '3':
            $self_rented = '1)Self 2)Rented';
            break;
    }

    $location = @$pt10values[0]['location'];
    switch ($location)
    {
        case '1':
            $location = 'Main Road';
            break;
        case '2':
            $location = 'Off Road';
            break;
    }


    $baseXcoordinate = 5;

    $this->_FpdfGenerator->AddPage();
    $this->_FpdfGenerator->AliasNbPages();
    $this->_FpdfGenerator->SetXY($baseXcoordinate, 10);
    $this->_FpdfGenerator->SetFont('Arial', 'B', 5);
    $this->_FpdfGenerator->MultiCell(13, 7, 'Rating Area', 1);
    $this->_FpdfGenerator->SetXY(18, 10);
    $this->_FpdfGenerator->SetFont('Arial', 'B', 6);
    $this->_FpdfGenerator->MultiCell(15, 7, 'Zone', 1);
    $this->_FpdfGenerator->SetXY(33, 10);
    $this->_FpdfGenerator->SetFont('Arial', 'B', 5);
    $this->_FpdfGenerator->MultiCell(25, 7, 'Area', 1);
    $this->_FpdfGenerator->SetXY($baseXcoordinate, 24);
    $this->_FpdfGenerator->SetFont('Arial', 'B', 7);
    $this->_FpdfGenerator->MultiCell(28, 9, 'Property No', 1);
    $this->_FpdfGenerator->SetXY($baseXcoordinate, 33);
    $this->_FpdfGenerator->SetFont('Arial', 'B', 7);
    $this->_FpdfGenerator->MultiCell(28, 9, 'Pin', 1);
    $this->_FpdfGenerator->SetXY(58, 10);
    $this->_FpdfGenerator->SetFont('Arial', 'B', 6);
    $this->_FpdfGenerator->MultiCell(20, 7, 'Issue Date', 1);
    $this->_FpdfGenerator->SetXY(78, 10);
    $this->_FpdfGenerator->SetFont('Arial', 'B', 6);
    $this->_FpdfGenerator->MultiCell(25, 7, 'Due Date For Payment', 1);
    $this->_FpdfGenerator->SetXY(89.5, 10);
    $this->_FpdfGenerator->ln();
    $this->_FpdfGenerator->Output();
   }

i Dont know what am i missing coz for single value in array it is working fine. But when there are more then values in array it is not adding the pages.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:37:09+00:00Added an answer on May 31, 2026 at 2:37 am

    $this->_FpdfGenerator->Output(); terminates the document here is doc, so you should’n call it if there is some data to add

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to understand the math of this code snippet. A token is provided which
Hello this is code snippet which i get from Jquery Ajax based search I
For example result of this code snippet depends on which machine: the compiler machine
In P.S. of this posting you can find a C# code snippet, which uses
Edit: I put this snippet of code in jsbin: http://jsbin.com/eneru I am trying to
I am trying to understand this snippet of code DataInputStream stream = new DataInputStream(
I have the following code snippet in which I'm trying to print some statements
when I am trying to run this snippet of code I am getting some
I am having a problem trying to get this snippet of code to output
I have this code snipped which I use for input validation: public void validaUserID(FacesContext

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.