';
// Write content to the new window
childWindow.document.open();
childWindow.document.write(content);
childWindow.document.close();
// Wait for the window to load before printing
childWindow.onload = function() {
childWindow.print();
childWindow.close();
};
}