Habeeb Kambrath
Habeeb Kambrath

Reputation: 1

how to print a DIV contents with A5 size and keep css using jQuery

how to print a DIV contents with A5 size and keep css using jQuery?

am used printThis.js but print preview coming without CSS alignments and page size is different..

Upvotes: 0

Views: 1363

Answers (1)

Jason
Jason

Reputation: 7682

You can't do this within printThis (I'm the author), but you can use CSS.

Look at this CSS3 examples from http://www.w3.org/TR/css3-page/#size:

/* style sheet for "A4" printing */
@media print and (width: 21cm) and (height: 29.7cm) {
     @page {
        margin: 3cm;
     }
}

/* style sheet for "letter" printing */
@media print and (width: 8.5in) and (height: 11in) {
    @page {
        margin: 1in;
    }
}

/* A4 Landscape*/
@page {
    size: A4 landscape;
    margin: 10%;
}

Upvotes: 0

Related Questions