473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 21880
Dormilich
8,658 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,658 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,658 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,658 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,658 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,658 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,658 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

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

Similar topics

1
by: Praveen Nagaraj | last post by:
Hi, Can someone tell me if there is a way to specify the page size for a asp.net web page. I don't want to use javascript way to resize the page but would like to control the page on design...
1
by: Richard | last post by:
Hi, I am trying to tuning up the performance of PSQL. I have tried changing the cache size. I found that the default page size if 8k, I am just wondering has any one know, if page size if biger...
3
by: Joe Weinstein | last post by:
Hi all. I am debugging a JDBC application. I find that a certain query that has an order-by clause fails with a SQL1585N A system temporary table space with sufficient page size does not exist....
1
by: MacDermott | last post by:
I created a report to print labels, and it created a custom page size for the report. When I opened the properties of the printer driver I could see it listed - as Custom. Then I had to change...
1
by: Raja Shekar | last post by:
HI Every body , I would like to know whether is it mandatory to give Tablespace page size and Bufferpool page size equal..? i also heard like while creating tablespace if pages size of tablespace...
2
by: nikou_70 | last post by:
I write a page in HTML ,user can print it I want to fix page size in print page set up to (legal) that doesn't need user every time change option how I can do this.
3
by: lazy | last post by:
wat will happen to a std string function like strcmp etc when the size of the string is greater than page size of the OS? A bigger question is how will they be even stored? (if at all they can be...
5
by: suvarna | last post by:
Is it possible to reduce page size so that I can print more than one page on one page by inserting page break after each page printing. this feature must be printer dependent. i want it for hp...
7
by: =?Utf-8?B?Um9iIFRob21zb24=?= | last post by:
Hi is there a way in asp.net 1.1 to in code behind query the page size that is generated, I realise IIS does it as it has that data in the logs, I would like to capture this data so that I can...
2
by: Simon | last post by:
Dear reader, In case a report is a sub report the Report Header of the sub report is printed in the report but the Page Header of the sub report will not be printed. This is the same for...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.