homepage Welcome to WebmasterWorld Guest from 54.167.244.71
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Browsers / Firefox Browser Usage and Support
Forum Library, Charter, Moderators: incrediBILL

Firefox Browser Usage and Support Forum

    
printing with firefox, css print styles
topr8




msg:4097608
 9:10 pm on Mar 14, 2010 (gmt 0)

i'm trying to print a webpage onto A5 size paper, with the text aligned centrally.

a). i need to make this work in firefox, other browsers don't matter.
b). i have control over the computer/s that will do the printing - so i can set print margins to a known value if required.
c). making changes in the printer dialogue box, eg setting the page size to A5 is not an option, this needs to be idiot proof, the user needs to click the print button and it prints out as required.

the first problem is that firefox doesn't seem to support @page (and setting the page size)
thus:
@page {size: 5.875in 8.125in;) doesn't help.

i'm trying to put the content in a div of a width smaller than the width of the paper i want to print on, but playing around with the left padding/border/margin does not seem to be able to help me, the problem is aligning the text centrally.

i'm not thinking as i write this, maybe set the max-width of the page to the paper width and see what happens.

anyone tried to do this or anything like it before, any ideas?

 

penders




msg:4107302
 11:57 pm on Mar 30, 2010 (gmt 0)

i'm trying to print a webpage onto A5 size paper...
...making changes in the printer dialogue box, eg setting the page size to A5 is not an option


I would have thought that telling the browser (ie. via the printer dialog box) that the page size is A5 would be the first thing to do? Unless you are actually printing your A5 document on A4 paper?!

i have control over the computer/s that will do the printing


There is a FF add-on that enables you to change many printer settings via a JavaScript API. Sorry, I can't just remember what it's called - I tried to install it a while back and it crashed FF! But I'm not sure whether that was a fault of the add-on, or my system at the time! Hope that helps - would be interested to know how you get on with that if you do decide to go with the add-on.

topr8




msg:4114619
 9:40 pm on Apr 12, 2010 (gmt 0)

>>I would have thought that telling the browser (ie. via the printer dialog box) that the page size is A5 would be the first thing to do? Unless you are actually printing your A5 document on A4 paper?!

i am actually printing onto A5 paper

you are right, it is the most obvious thing to do, however, the main end user is quite 'technically' challenged and this application is used to print off documents in A4 and these A5 ones. they have just about learnt to change the paper size in the printer, they don't understand printer dialogue boxes! ideally they just press the 'print' button on firefox and then 'Ok' it when the dialogue comes up.

thanks for the tip about the firefox add-on, it looks like it's called:
JS Print Setup, i've just downloaded it but not had time to see if it can do what i want - will update post one way or another with the results of trying the extension out.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Firefox Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved