print preview page population from js