wkhtmltopdf landscape page break - wkhtmltopdf

I have a page that creates a table dynamically. Sometimes the table can be very wide, but not very tall. When converting to PDF, I would like it to span multiple pages, instead of shrinking down to fit on a single page, which is what it does now. When shrunk, it is so small, the text is pretty much unreadable.
So, basically I need to somehow make a 'horizontal' page break if that makes any sense. Any ideas?

Add the page-break-before:always style on the elements where you want to start with a new page.

Related

View whole page in inspect/dev tools window

Is there a way so I can see my entire page while having the inspect/dev tools open in google chrome, as it is it is only displaying the far left two inches of the page which isnt particularly helpful when trying to view aspects on the other side?
I am trying to see the entire chart. I have tried to enlarge/shrink screen size and increase % and adjust to fit but it still only manipulates the two inch strip visible here instead of the entire chart.

Fit header image in mobile header menu

How can I make this
image fit the mobile header menu? I also want to make it larger as you can barely see what's written below the logo.
The image should stay in its place on the desktop version - I am satisfied with how it looks
Website for reference
Thank you very much for your help.
Ok, first of all.. Is this done with bootstrap, or something, or did you make it from scratch?
The problem is, your "nav" is 100% wide, taking all the space to the left. Also, your header-image-wrap div is 100% wide, as well. Therefore, they can only fit one underneath another.
You need to change your code. In mobile view, navigation doesn't need to take all that space. It should only be a size of a hamburger menu. If it's bootstrap, find a nav bar that has logo on it, and make a mobile logo image, or change the default design. I don't think there's a practical solution for this one.. As far as my knowledge goes...
As far as the size of an image go, you need to make another one, for mobile view, if you want bigger letters and stuff. You can't really change this one with css.

What is the "best practice" to fit a slickgrid into tight screen real estate?

We want to use slickgrid to overlay clunky and inflexible tables of data on hundreds of existing web pages built from business forms. Some tables are for display only, others are for user input/update. Thus, the real estate (and column/row counts) is set in concrete. To avoid conflict with the parent page styles, the grid is placed in an iframe. The approach has to take into account a caption bar, optional filter bar on inquiry-only tables, column header bar, and footing pager bar (only if required). Getting the ovarall height correct is the most difficult. It looks like the available tools are:
the geometry of the iframe
the geometry of the grid-container div in the iframe
options.rowHeight
options.headerRowHeight (if inquiry)
line-height css style
Font-size css style.
It seems that there is some mysterious arithmetic going on to calculate the number of rows displayed, the canvas size and the viewport size; and setting some of these items directly with script breaks the grid.
As a simple example, assume the height available is H pixels and must contain R rows of data. Are there any formulas or guidelines that give values to the items listed above? Or must we struggle with trial and error to make a good fit?

How to prevent overflow text in a text block?

I'm trying to make an ebook reader. I want each page to scroll sideways (like the Pivot viewer does) but I can't get out how to figure out how many words need to be added to the text box on a screen to before it starts overflowing (I don't want the user to scroll vertically).
Any tips?
Thanks!
There is a Scrollable TextBlock which divide text into blocks of 2048px height. You can use their code to get text that will exactly fit into one page (800px, for example)
Creating Scrollable TextBlock for WP7
If you call the UIElement.Measure(Size) method, then check the UIElement.DesiredSize property, it will tell you the size of an element before it is rendered. You could add text, repeatedly measuring the rendered size.
However ... this will be pretty inefficient. It is much better if you can create a layout that performs what you require automatically.

is there built-in way to make DevExpress XtraGrid GridView column headers/captions diagonal to save horizontal space?

I have a whole bunch of very narrow columns in a DevExpress GridView and I want to save on column header width by making the caption text (which is too wide even at 3-4 letter abbreviations) slanted / diagonal. Well, so I guess I could get rid of text captions and replace them with pictures of diagonal text, at least if GridView will allow sufficient height for the header.
Is there any built-in way to just display the rotated text without going the image way? I don't think I am the first programmer out there trying to squeeze out horizontal space like that, so this doesn't sound like an outlandish thing to support in a popular grid component :-)
If not, and so I do have to use an image for column header, any relevant suggestions or warnings?
XtraGrid does not provide a built in functionality to show column header captions this way. However, this can be done within the CustomDrawColumnHeader event handler. We have posted a tutorial showing how this can be done. By default, it should be located at:
C:\Users\Public\Documents\DevExpress 2010.2 Demos\Components\WinForms\XtraGrid\CS\GridTutorials\GridVerticalHeaders
NOTE, as this feature is implemented using custom draw. It means that this text is only painted this way. Custom drawn text won't be exported or printed.

Resources