'SharePoint 2010 - How to print InfoPath form for list item

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 works?

Thoughts?



Solution 1:[1]

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

Solution 2:[2]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vladi Gubler
Solution 2 Minority