GdPicture.NET Reference Guide
PrintSetAlignment Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : PrintSetAlignment Method
A member of the PrintAlignment enumeration.
Sets the image alignment into the page during a print process.
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.

Return Value

A member of the GdPictureStatus enumeration.
Example
Making sure paper alignment is middle left, if not setting it to be so.
Dim oGdPictureImaging As New oGdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("multipage.tif")
If imageId <> 0 Then
   Dim pageCount As Integer = oGdPictureImaging.TiffGetPageCount(ImageID)
   If pageCount > 1 Then
      oGdPictureImaging.PrintSetFromToPage(1, pageCount)
   End If
   If oGdPictureImaging.PrintGetPaperHeight() <> PrintAlignment.PrintAlignmentMiddleLeft Then
      oGdPictureImaging.PrintSetAlignment(PrintAlignment.PrintAlignmentMiddleLeft)
   End If
   oGdPictureImaging.Print(ImageID)
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
PrintGetAlignment Method