devxlogo

Set Printer Margins

Set Printer Margins

You can use the Printer’s scale properties to set margins. Set the properties so the position (0, 0) is mapped to where you want the margins. This code makes the left margin 0.5 inch and the top margin 0.75 inch. The factor of 1440 converts inches into twips:

 Printer.ScaleLeft = -0.75 * 1440Printer.ScaleTop = -0.5 * 1440Printer.CurrentX = 0Printer.CurrentY = 0
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist