Skip to main content

We are trying to get a print button that will also validate before printing as we have some forms that still require a signature (cannot use workflow approval).  We have tried using windows.print() however we have issues with the form fitting on one page.  Either the right side is cuttoff or we use fitt to page and it is really small.  Also, it requires teh end user to not print the header and footer of the web page (cannot rely on them).

We have tried using the Print to PDF line  NWF.FormFiller.PrintToPDF.PrintToPDF(); this doesn't work well in that if all fields validate fine it does not go to the PDF since it is saving the form to the Sharepoint List/Library and it is now closed.  It only works if their is a required field that has no data....hmmm what else???

Try adding this script to the button which will prompt the user to print. They can also SAVE the file as a PDF too.

function printMonsterForm()
{
var curURL = window.location.href;
//alert("curURL:"+ curURL);
curURL = curURL+"&isdlg=1";

var curWin = window.open(curURL);
}


Can you add a button control that has the setting to Cause Validation, and it call window.print? Also, you can set print media css using (at)Print media query to hide/move areas of the form. CSS3 Media Queries 


Hi Dheeraj,

Where is the print command called?

Dawn


The javascript button would call the window.print.


Reply