Adding print functionality in a page
May 15, 2008 12:00 AM
A further question was posted to me via Private Communication, and I wanted to share the reply with this forum... so here is that communication.Question:Can you explain me more on how to print a page with specified format. The thing is i want to print results page. In this page i have three text box set as invisible at first and results are stored in these text boxes. I can set print but text appears all the middle of the page.So how do you print giving specified format?My Answer:I simply formatted the page I wanted to print, that is set the individual page width and height (not inherited from parent) and then formatted the page with whatever I wanted on it, e.g., text, variables, font size, color etc. In my case I have a few variables that are being displayed for items like Date, Name entered and they are strategically placed over text, such as a certificate, a checklist, or similiar, and then this page is not visible nor in the TOC listing. However, it does have one action on it, and it is an action to PRINTPage on show.Now when I want to link to this page, I do so through a button or link on a previous page, and when it appears the formatted page is the correct size, and you are prompted to print immediately. Once you print, the page closes.That is pretty much it. You will need to format the text on the page as you would any other text. However, if you are trying to print hidden text, that may be cumbersom and I can't assist with that. If however, you want to print out a certificate or confirmation of tranining, or a checklist etc, this is a good solution.In my experience, I only provided a link to this (non TOC listed page) on the Congrats page you are taken to after you successfully complete an assessment or quiz. That way, the only way a user can get to print out the form is by successfully completing the test / assessment etc. If you have any further questions, please ask.
Discussions have been disabled for this post