Printable web part view
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Printable web part view

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development
Author Message
Guest






Posted: Tue Jan 25, 2005 9:16 pm    Post subject: Printable web part view Reply with quote

Is anyone aware of a third-party tool or customization technique to
have a printer-friendly view of a web part? I need to have a print
button on several web parts, and have the printable view only show the
web part, but not include the header, side navigation, and other page
elements. Could this be accomplished with FrontPage?
Thanks for any input.

Matt
Back to top
Guest






Posted: Wed Jan 26, 2005 3:31 am    Post subject: Re: Printable web part view Reply with quote

Found a (non-elegant) solution. This is so simple you won't need the
code example. This assumes you need a printable version for a custom
Web Part you are building.

1. Create a new Web Part Page.
2. Add your (custom) Web Part to the page.
3. Customize the new web part page in FrontPage 2003, and remove the
header, side nav, footer, etc., and anything else you don't want.
There are some elements you can't remove. I just remove the primary
secitons in the Designer view in FrontPage 2003, which was enough.
4. Creat a custom CSS file for print versions, and add it to the HEAD
section, making sure it renders after the standard SPPS CSS references.
5. Add a JavaScript fuction for self.print() in the page's BODY tag, so
that the Printers dialog box comes up when the user loads the page.
6. Add a PrintVersionUrl property to my Web Part, and add a text box to
edit the PrintVersionUrl property in my Tool Part class (making sure
the property is setting the Shared WebPartStorage attribute, so all
users are using the same printable page.)
7. Add a boolean variable in my Web Part to show hide different
sections of the actual Web Part data, depending if the web part is in
"print" mode or not.

That's about it. I would still like to see someone find a solution for
a single "common" print-version page that can dynamically host any web
part on the fly...

- Matt


andersonwebdev@hotmail.com wrote:
Quote:
Is anyone aware of a third-party tool or customization technique to
have a printer-friendly view of a web part? I need to have a print
button on several web parts, and have the printable view only show
the
web part, but not include the header, side navigation, and other page
elements. Could this be accomplished with FrontPage?
Thanks for any input.

Matt
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB