PrintBySize 14.0.23
Posted: Mon Oct 16, 2017 11:51 pm
Based on the documentation PrintBySize should accept its values in inches. No matter what values I pass to PrintBySize it always seems to scale the print job to fit the page. Perhaps I am missing something but I would expect code sample below to essentially take my image and print it with a 2 inch margin on 8.5 x 11 paper.
Sample Code
Dim ImageID = GDPic.CreateGdPictureImageFromFile(ImageName)
GDPic.PrintSetAutoRotation(True)
GDPic.PrintSetAlignment(PrintAlignment.PrintAlignmentMiddleCenter)
GDPic.PrintBySize(ImageID, 2, 2, 4.5, 7)
GDPic.ReleaseGdPictureImage(ImageID)
Documentation
'Declaration
Public Sub PrintBySize( _
ByVal ImageID As Integer, _
ByVal DstLeft As Single, _
ByVal DstTop As Single, _
ByVal Width As Single, _
ByVal Height As Single _
)
Parameters
ImageID
GdPicture Image Identifier.
DstLeft
Specifies the x-coordinate (in inches) of the upper-left corner of the image into the paper.
DstTop
Specifies the y-coordinate (in inches) of the upper-left corner of the image into the paper.
Width
Specifies the width (in inches) of image into the paper.
Height
Specifies the height (in inches) of image into the paper.
Sample Code
Dim ImageID = GDPic.CreateGdPictureImageFromFile(ImageName)
GDPic.PrintSetAutoRotation(True)
GDPic.PrintSetAlignment(PrintAlignment.PrintAlignmentMiddleCenter)
GDPic.PrintBySize(ImageID, 2, 2, 4.5, 7)
GDPic.ReleaseGdPictureImage(ImageID)
Documentation
'Declaration
Public Sub PrintBySize( _
ByVal ImageID As Integer, _
ByVal DstLeft As Single, _
ByVal DstTop As Single, _
ByVal Width As Single, _
ByVal Height As Single _
)
Parameters
ImageID
GdPicture Image Identifier.
DstLeft
Specifies the x-coordinate (in inches) of the upper-left corner of the image into the paper.
DstTop
Specifies the y-coordinate (in inches) of the upper-left corner of the image into the paper.
Width
Specifies the width (in inches) of image into the paper.
Height
Specifies the height (in inches) of image into the paper.