I edited the form for a list item in InfoPath, and when I print, I just want to print the form itself.
It seems when I use the browser's print function, it still pulls up some elements from the page and it cuts off the content if it's longer than the popup window. Also, some of the elements of the form are hidden when I print, so that is not a good option.
I have read that others have attempted to create a custom action that resides in the InfoPath Ribbon, but I have yet to find one that wor开发者_如何转开发ks?
Thoughts?
Maybe it will give you some direction: what we did in this case was to add a simple Print button (we used Content web part, but you can do whatever). The print button uses JS to cut out only the relevant portion (based on DOM/CSS) and show it in a new window - basically we open the form in a new window and pass a QS parameter, the JS picks it up and cleans the form. Worked well and was very simple to do, just a few lines of javascript
For anyone wanting some help with creating a printable form, I helped someone on the SP Forum with the issue.
http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/c9bac913-3747-4981-9d3b-4c8316baadb2
Hope it helps someone.
精彩评论