如何设置成A3模式打印?
不知为什么打印不了a3的图片,设置不到A3模式,只能在A4状态下打印
在form1里的代码如下:
Imports System.Drawing.Printing
Imports System.Drawing.Image
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pd As New PrintDocument()
Dim pkCustomSize1 As PaperSize = New PaperSize("A3", 1000, 1000)
pd.DefaultPageSettings.PaperSize = pkCustomSize1
pd.DefaultPageSettings.PaperSize.PaperName = "A3"
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
pd.Print()
End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
Dim newimage As Image = Image.FromFile("I:\public\A3.jpg")'a3的图片
Dim ulCorner As New Point(0, 0)
ev.Graphics.DrawImage(newimage, ulCorner)
End Sub
End Class