Hello
i see, but use window width is just a hack,
- not best approach for this
(but we can limit browser window according to some logic (configured paper size + 150 pixels) )
So we should add specific CSS
- CSS2+ supports this
i will open an issue to add parameter new parameter
- i think to call it:
Paper size of print preview: OPTIONs: A4, A3, etc ...
(with inline description: This limits print popup to look like the configure size, it does not force / control user selection of paper size,
also this will limit the width of the popup window)
so what you can do now: (until we add support)
- do not hack the file
- instead, edit (add at the top):
component/com_flexicontent/templates/item.php
for A4 paper (it will shape output to A4 width and add some margins and also will resize window too):
Code:
if ( JRequest::getInt('pop') ) {
JFactory::getDocument()->addStyleDeclaration("
body {
width: 8.27in;
margin: .5in .5in .5in .5in;
}
@page {
size:8.27in 11.69in;
margin:.5in .5in .5in .5in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;
}
}
");
JFactory::getDocument()->addScriptDeclaration("
window.resizeTo( ((screen.width-100) > 1000 ? 1000 : (screen.width-100)), ((screen.height-100) > 1000 ? 1000 : (screen.height-100)) );
");
}