I don't think this is possible. You cannot know all the users' print-settings in the browser (javascript) and definitely not on the server (php, asp, java).
update
Think about it this way (please keep in mind that a decent 100% solid print preview is NOT possible):
- User navigates to page and asks for a print preview
- Website provides print preview (preferably in a html-format, otherwise png or pdf)
- User likes and wants to print:
- From the browser
- From some image viewing/editing program (png)
- From Acrobat (pdf)
- Every print solution has it's own Print... dialog. You can change print settings here.
It's the last point where everything you want fails... You don't have control over the output anymore at that point (from your website)...