Hi @Ken Smith , Welcome to Microsoft Q&A,
printDoc.PrinterSettings.DefaultPageSettings.Margins.Left
-
PrinterSettingsrefers to the settings associated with a specific printer.PrinterSettings.DefaultPageSettingscontains the default page settings associated with that printer. Changing the value ofPrinterSettings.DefaultPageSettingsaffects all documents printed using the default settings for that printer. - For example:
printDoc.PrinterSettings.DefaultPageSettings.Margins.Left = 75
This code changes the page margins associated with the printer's default settings.
printDoc.DefaultPageSettings.Margins.Left
-
PrintDocument.DefaultPageSettingscontains the default page settings associated with the current print document instance. These settings apply only to the currentPrintDocumentinstance. - For example:
printDoc.DefaultPageSettings.Margins.Left = 75
This code will only change the page margin settings of the current print document instance.
Usage scenarios
Scenario for using PrinterSettings.DefaultPageSettings (statement (1)):
- Use
PrinterSettings.DefaultPageSettingswhen you want to change the default settings associated with a specific printer. This is usually used to use the same printer settings uniformly in multiple print operations.
Scenario for using DefaultPageSettings (statement (2)):
- Use
DefaultPageSettingswhen you want to set specific page margins for the current print document instance. This is usually used for a single print operation, or when each print document instance may have different settings. Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.