How to prevent mpdf page auto break with long row - mpdf

I have a problem in mpdf. I have 2 rows in a table. The 1st row fit in the first page, but the 2nd row is put on the next page cause it have a lot of data, but there is too much space on the first page.
I want to at least make the row, cut to occupy the remaining space on the first page. Is this possible in mpdf? If yes, how can I do that?

Related

Empty grid space in component

I have a grid inside a component which has some rows and columns. The problem is that there is some empty space after the last row of the grid and I want to get rid of it. This is what it looks like in the inspector, it actually shows that the whole content is the grid, whereas only the rows with actual information are the content of the grid. I want to remove this white space which is there for no reason. For clarification this is the empty unwanted space:
You could use setHeightByRows to set the Grid to contain a fixed amount of rows, or setHeightUndefined to always show all the rows (bad idea if your Grid ever has massive amounts of data in it).

What is a way of creating a reactive grid with dynamic rows

So basically, I have a react app and I am trying to create a grid of square elements but:
i dont want to
shrink them below a certain size (meaning that when the page
shrinks, the last elements on a row are pushed to the next row
etc.).
I was also hoping to put in a few special 2x2 elements in the grid (realistically not
many, between 1-3)
I am looking to be able input a series of objects (ordered by priority) and have the page dynamically allocate them into the grid space as best it can.
I have done bootstrap grids in the past, 1. could be achieved fairly easily by changing the .col-x value at certain screen widths so the elements wrap
But 2. seems really hard:
making a static row with a 2x2 element and some 1x1 elements seems
easy, but then it will all break when the above row tries to wrap, or
when i have to wrap elements in this static row.
I was also thinking of offsetting 2 consecutive rows and just placing a div with the 2x2 boxes over the offset, but then i would have to change the row elements that are being offset on the fly, and i dont know how to get an element to tell me what row and column it is in.
Any ideas?

MPDF row page break

I have a problem in mpdf. I have 2 rows in a table. The 1st row fit in the first page, but the 2nd row is put on the next page cause it have a lot of data, but there is too much space on the first page.
I want to at least make the row, cut to occupy the remaining space on the first page. Is this possible in mpdf? If yes, how can I do that?

Smart resizing for rows of html inputs

I have a tr with td's containing inputs. I'm not applying any size attribute or style with regard to width.
Some inputs contain just single digits and some contain words. The ones containing single digits have much extra white space and the ones containing words contain far less.
When I resize the page containing the table, the table shrinks to keep fitting 100% of the page. But, all the inputs seem to basically resize at about the same rate with no regard for which input has the most space to give up. By space, I mean the empty area in the input that does not show any data; the extra space to the right (as my inputs are left aligned).
Is there a css property that would apply to this situation to help accomplish reducing the size of the inputs which have the most white space to give up first and putting off truncating visible text as long as possible?
You could try auto sizing the inputs using a script like this:
https://stackoverflow.com/a/931695/288568
Anyways, the script is not for drop downs so far, but could be adapted.
But: If in the first line there is a 1 and in the second a 11 then the inputs would have different sizes.

How can I build a printable table CSS 11x17 with header on every page

So here is my challenge. I need to build a printer-friendly table in html/css that needs to meet a few requirements.
a) I am going to have an html table, with each row having adjustable heights depending on the amount of text in each row. A row cannot be "cut-off" at the end of a page and the start of the next page.
b) There is no defined number of rows per page, this needs to be flux depending on how many can fit.
c) every page must have the same header of a defined height.
d) The page must be printable on 11x17 paper with half inch margins.
Basically I am not sure how to approach this. I have built a normal in html - but when printing the rows get cut off. I also am not sure how to figure out the "header" on every page requirement.
Any ideas on the best way I can approach this challenge?
Thanks!

Resources