radi8 Posted April 22, 2009 Share Posted April 22, 2009 I need to create a printer friendly display of a page I am creating. Typically, on a page where the content is from a DB or something, this is no big deal, just send the content that was used to create the page to the print css controlled page and blammo, ready to print. On the pages I am creating, we are using a good bit of javascript to allow the user to change values and recalculate other elements on the page for analysis purposes. This changes the details significantly throughout the page from what was originally retrieved from the DB, and since the changes are not (currently) being stored anywhere, getting these changes to the print preview page has me stumped. I was hoping that someone may have a solution to this little problem or point me in the right direction. ??? Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/ Share on other sites More sharing options...
revraz Posted April 22, 2009 Share Posted April 22, 2009 sessions? Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/#findComment-816504 Share on other sites More sharing options...
Daniel0 Posted April 22, 2009 Share Posted April 22, 2009 Can't you just make a new stylesheet for the print media type? <link rel="stylesheet" href="css/print.css" media="print" type="text/css"> Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/#findComment-816536 Share on other sites More sharing options...
radi8 Posted April 22, 2009 Author Share Posted April 22, 2009 I am using session variables to control the print preview output and also have a new print.css that I am using, and it is working nicely for the default page information. I am attaching a word doc showing the form and the elements I am using. Almost all of these elements are editable and will change values in related element fields. So, it is possible to do recalculation of all the elements on the entire form. These changes will then need to be printed. What I cannot get is how to capture these changes in the preview page. I hope that clarifies things somewhat (it is hard to explain but I am trying to be clear) [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/#findComment-816551 Share on other sites More sharing options...
mrMarcus Posted April 22, 2009 Share Posted April 22, 2009 in fear of completely over-thinking this, isn't it just as simple as submitting it as a regular form? as you said, all those fields are in a form, right? just create a button to send the user to the print 'preview page'. sorry if i'm coming across ignorant at all, but that's what i'm getting from what you are asking. please, let me know why that wouldn't work. Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/#findComment-816563 Share on other sites More sharing options...
radi8 Posted April 22, 2009 Author Share Posted April 22, 2009 in fear of completely over-thinking this, isn't it just as simple as submitting it as a regular form? as you said, all those fields are in a form, right? just create a button to send the user to the print 'preview page'. sorry if i'm coming across ignorant at all, but that's what i'm getting from what you are asking. please, let me know why that wouldn't work. You are probably correct MrMarcus (thanks for the quick reply btw), but I am not a guru at this stuff at all and things like this really hurt my head (as can be seen by the keyboard impression on my forehead). If it is possible to take a form, as defined in the previous post, with all of its elements and plop it onto a new page, then this is a technique I need to learn. I am starting to form an idea on how to do this, but it will take a good bit of testing to validate it. If you have any documentation or can reference a tutorial/post on how this works, please let me know. Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/#findComment-816604 Share on other sites More sharing options...
mrMarcus Posted April 22, 2009 Share Posted April 22, 2009 first off, how is your page currently being displayed? are you using HTML (<input type="text" name="blah" />, etc.)? Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/#findComment-816608 Share on other sites More sharing options...
radi8 Posted April 22, 2009 Author Share Posted April 22, 2009 Yes, it is a pure HTML/PHP architecture with tons of java script. I think I will drop this for now, I think I am beating a dead horse and you have better things to do. Thanks anyway. Quote Link to comment https://forums.phpfreaks.com/topic/155210-print-page-preview-question/#findComment-816712 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.