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?
Here is an answer for this but we are unfamiliar with Java Script.
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
Does anyone have the Java Script code for this?