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

  • SEARCH
  • Home
  • 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 8038179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:08:56+00:00 2026-06-05T03:08:56+00:00

I use CGridView to render a result (invoice rows) from a db query. This

  • 0

I use CGridView to render a result (invoice rows) from a db query. This is done inside a <div> on html page that is later converted to a PDF using wkhtmltopdf and printed. The problem is that today I have no support for page break so if number of invoice rows are greater than 10 the remaining rows are not visible. I can’t let the div flow since I have an invoice footer with an absolute position that can’t move.

Is there a way to force a page break and continue rendering rows on a separate page?

Below is part of the CGridView code used.

<...plenty of html---->
<div class="invoiceRow">
<?php

$this->widget('zii.widgets.grid.CGridView', array(
    'dataProvider' => $dpRows,
    'cssFile' => Yii::app()->request->baseUrl . '/css/invoice.css',
    'summaryText' => '',
    'enablePagination' => false,
    'columns' => array(
        'number',
        'name',
        'description',
        'amount',
        array (
            'name'=>'value',
            'header' => 'netprice',
            'value' => 'number_format($data->value,2,","," ")'
        ),
    ));
?>
</div>
<---more html ----->
  • 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-06-05T03:08:58+00:00Added an answer on June 5, 2026 at 3:08 am

    If wkhtml is able to parse css (it seems so) you could try:

    <div style="page-break-after:always">
        //X invoices here
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how to use Pager(GridView or ListView) with html link. is that right that this
I am trying to use the DateTime picker custom gridview column type from this
I have a master-detail page, in which I use GridView to display multiple rows
I use this grid to view a table with data: View part: <?php $this->widget('zii.widgets.grid.CGridView',
In asp.net I use like this: gridView_Desti.Columns[CODE_DEST].Caption = (string) HttpContext.GetGlobalResourceObject(Client, Code_Dest); How can I
i use this code for exporting gridview to Excel in asp.net - c# .....but
Im populating a GridView from List so am forced to use TemplateField controls to
I am trying to use some C# code that expands on the GridView functionality
I have an ambitious requirement for an asp.net 2.0 web page that contains a
how to use gridview control in my silverlight xaml page in asp.net & c#.net?

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.