This question: Google Apps Script to open a URL leaves one thing unanswered: After opening the URL, can the script close the tab (or window) used to open the URL? Specifically, I'm using the code from that post to open a PDF for printing. After printing, and closing the PDF file, the tab opened by the script remains. Can the same script that opened the tab ("_blank"), also close the tab?
<script> window.open('<?=url?>', '_blank', 'width=100, height=100');
google.script.host.close();
window.close();
</script>
The code above comes from code posted by stephen-m-harris