Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / PrintSetAlignment Method
A member of the PrintAlignment enumeration. The new value of the image alignment property.
Example





In This Topic
    PrintSetAlignment Method (GdPictureImaging)
    In This Topic
    Sets up the value of an image alignment setting of the active printer. This value determines how the image is aligned when printing.
    Syntax
    'Declaration
     
    
    Public Function PrintSetAlignment( _
       ByVal Alignment As PrintAlignment _
    ) As GdPictureStatus
    public GdPictureStatus PrintSetAlignment( 
       PrintAlignment Alignment
    )
    public function PrintSetAlignment( 
        Alignment: PrintAlignment
    ): GdPictureStatus; 
    public function PrintSetAlignment( 
       Alignment : PrintAlignment
    ) : GdPictureStatus;
    public: GdPictureStatus PrintSetAlignment( 
       PrintAlignment Alignment
    ) 
    public:
    GdPictureStatus PrintSetAlignment( 
       PrintAlignment Alignment
    ) 

    Parameters

    Alignment
    A member of the PrintAlignment enumeration. The new value of the image alignment property.

    Return Value

    A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

    We strongly recommend always checking this status first.

    Remarks
    Just to remind you that the active printer is the printer identified by the PrintGetActivePrinter method or set by the PrintSetActivePrinter method and it is dedicated to executing all subsequent print jobs using this class as well as utilizing all by you altered printer settings.
    Example
    Setting basic printer properties.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        Console.WriteLine("Setting image alignment to -top left corner-");
        gdpictureImaging.PrintSetAlignment(PrintAlignment.PrintAlignmentTopLeft);
     
        Console.WriteLine("Setting number of copies to -3-");
        gdpictureImaging.PrintSetCopies(3);
     
        Console.WriteLine("Setting duplex mode to -Horizontal-");
        gdpictureImaging.PrintSetDuplexMode(System.Drawing.Printing.Duplex.Horizontal);
     
        Console.WriteLine("Enabling document collate");
        gdpictureImaging.PrintSetCollate(true);
    }
    See Also