0

Is it possible to change the attributes of the css @page rule via jQuery (jscript)? What I need is to switch between different @page configurations:

option 1:

@page {
 size: A3;
 margin: 0;
}

option 2:

@page {
 size: Letter;
 margin: 20;
}

Since these css attributes are not linked to any dom alements, we cannot change them via jQuery .css() method.

Any suggestions?

Thanks

user2723490
  • 2,010
  • 4
  • 27
  • 37
  • 1
    Doesn't this work ? http://stackoverflow.com/questions/11160260/can-javascript-change-the-value-of-page-css – Denys Séguret Mar 03 '14 at 10:26
  • wouldn't you be better to have 2 different styles sheets and load each one independently? That way you can have different files for different aspects, and you keep things neat for the next time you need to update anything. – balexandre Mar 03 '14 at 10:26
  • Thanks dystroy! I have not tested, but think it should work. Perhaps a better solution than loading several css files. Again, thanks a lot! – user2723490 Mar 03 '14 at 10:33

0 Answers0