PrinterSetup Method

The PrinterSetup method opens the printer setup dialog-box. When the printer setup dialog-box is opened and the user changes settings then hits OK, these settings are saved in the internal document class.

This variable is the same one that is changed when we set the document attribute "PrinterDevMode".

 

Syntax

VB:

Sub PrinterSetup()

C#:

void PrinterSetup()

C++:

HRESULT PrinterSetup()

 

Example

// This method causes the printer setup page to show.
// When OK is pressed the PrinterDevMode property is set
// in the document.
pdf.PrinterSetup ();
// Now that the property is set, we can call
// get_ObjectAttribute to retrieve
// its value. The value is a byte array.
object settigns1=pdf.get_ObjectAttribute("Document","PrinterDevMode");
// Here, we directly set the same value we obtained.
// We could however, have saved it aside and used the
// command below to restore the printer settings to
// settings1 after the user had brought up and changed
// the printer settings a few times.
pdf.set_ObjectAttribute ("Document", "PrinterDevMode", settigns1);