Configure printer settings

Hello everyone,

Is it possible to use powershell to disable the Headers and footers? I have been searching but I haven’t found anything. If powershell is not able todo this is there any other way this can be adjusted using a script?

Hello Jane,

Are you asking about changing settings in google chrome? If that’s possible it wouldn’t be anything specific to powershell, chrome would need to offer an interface to allow you to programmatically change it. I would first find how to do it at all, then start looking at doing that in powershell.

Hi krzydoug, everyone,

From my own understanding the printer settings are within the Print dialogue, not in browser settings. This is why i am trying todo this from Powershell.

I also have noticed that the same print dialogue option (header/ footing) appears in Microsoft Edge.

The thing is i know from searching the Powershell documentation there are printer settings to set paper size and such but i have not found a way to disable the header/footing.

Any insights is appreciated!

It is undoubtedly a part of the chrome interface. Edge is built off of the same open source project that chrome is. Here is a stackoverflow answer detailing that certain builds of chrome now include option to remove the header when printing (and unfortunately the footer as well)

--print-to-pdf-no-header

Here is a node.js package that gives you the capability to programmatically print without headers

Quote from that page

Motivation

google-chrome currently have option to render pdf files when used with headless option. But this option contains hardcoded adding header and footer to page rendering it unusable for pdf generation. This module allows to generate it without those elements.

Here is the github project

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.