469,290 Members | 1,887 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

printing a page in as per A5 size sheet

pradeepjain
563 512MB
Hii guys i want to print a page in an A5 size page ! it has to be done using print.css and what are the parameters for the A5 size page ! any help on this!
Sep 21 '09 #1
14 19584
Dormilich
8,651 Expert Mod 8TB
A5 size is 148 x 210 mm. according to DIN 476.
Sep 21 '09 #2
pradeepjain
563 512MB
@Dormilich
How do i start writing css as per A5 page !! i am finding it difficult! any help on this!
Sep 21 '09 #3
Dormilich
8,651 Expert Mod 8TB
@pradeepjain
you could try setting the screen dimensions in such a way, that it resembles an A5 page (though there wonít be page breaks), other than that you can only check the print preview for how it looks.

and eventually set the media type of the css to print.
Sep 21 '09 #4
pradeepjain
563 512MB
i did find out this document it helped setting the A5 size

http://www.w3.org/TR/css3-page/

but the page margins and all are still not working properly :(

Expand|Select|Wrap|Line Numbers
  1. @page {
  2.   size: 8.5in 11in;
  3.   margin: 10%;
  4.  
  5.   @top-left {
  6.     content: "Hamlet";
  7.   }
  8.   @top-right {
  9.     content: "Page " counter(page);
  10.   }
  11. }
i tried out this code from that document the hamlet, and page counter are not appearing, but the properties from the printer are taken like url and all ..how to override all this things from css ??
Sep 22 '09 #5
Dormilich
8,651 Expert Mod 8TB
it depends on the CSS3 support your browser offers.
Sep 22 '09 #6
pradeepjain
563 512MB
@Dormilich
i am using FF 3.5.2 version!! It has css3 support rite!
Sep 22 '09 #7
Dormilich
8,651 Expert Mod 8TB
@pradeepjain
while FF supports CSS3, it still does not fully support it, check the docs to see what properties are not yet supported.
Sep 22 '09 #8
pradeepjain
563 512MB
@Dormilich
So is there any way to control whole printer properties and add new headers and footers and margins!!
Sep 22 '09 #9
Dormilich
8,651 Expert Mod 8TB
donít know exactly, but padding and margin should not be a problem.

if you want total control, you might have to use XSL-FO.

mind that a browser is not intended for printing web pages in the first placeÖ
Sep 22 '09 #10
pradeepjain
563 512MB
@Dormilich
wokie! my need is to print reports to patients in a A5 size paper with some details from DB . which is the best way ti do it !!!!
Sep 22 '09 #11
Dormilich
8,651 Expert Mod 8TB
use a server script to prepare a PDF file.

more info here:
Printing with CSS @ ALA
Sep 22 '09 #12
pradeepjain
563 512MB
@Dormilich
which is the best library to use for pdf generation !there are many of it !!

http://www.google.co.in/search?q=php...ient=firefox-a
Sep 22 '09 #13
Dormilich
8,651 Expert Mod 8TB
no idea, havenít used server side PDF creation yet. the article mentiones Prince
Sep 22 '09 #14
Catz
3
For XSL-FO you may also want to use a visual designer such as Ecrion XF Designer, especially if you are a beginner.
When it comes to printed documents, you can have more than 1 type of page.
Feb 4 '10 #15

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Praveen Nagaraj | last post: by
1 post views Thread by Richard | last post: by
3 posts views Thread by Joe Weinstein | last post: by
1 post views Thread by MacDermott | last post: by
1 post views Thread by Raja Shekar | last post: by
2 posts views Thread by nikou_70 | last post: by
3 posts views Thread by lazy | last post: by
5 posts views Thread by suvarna | last post: by
7 posts views Thread by =?Utf-8?B?Um9iIFRob21zb24=?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.