G
George Waters
Guest
Hi,
I am using this code to print a ticket using a RDLC, as we know paper width varies from printer to printer.
So how can I get the default paper size of the plugged ticket printer so I can resize:
Private Sub Export(ByVal report As LocalReport)
Dim deviceInfo As String = "<DeviceInfo>
<OutputFormat>EMF</OutputFormat>
<PageWidth>8.5in</PageWidth>
<PageHeight>11in</PageHeight>
<MarginTop>0.25in</MarginTop>
<MarginLeft>0.25in</MarginLeft>
<MarginRight>0.25in</MarginRight>
<MarginBottom>0.25in</MarginBottom>
</DeviceInfo>"
Dim warnings As Warning() = Nothing
m_streams = New List(Of Stream)()
report.Render("Image", deviceInfo, AddressOf CreateStream, warnings)
For Each stream As Stream In m_streams
stream.Position = 0
Next
End Sub
Thanks in advance !!!
G.Waters
Continue reading...
I am using this code to print a ticket using a RDLC, as we know paper width varies from printer to printer.
So how can I get the default paper size of the plugged ticket printer so I can resize:
Private Sub Export(ByVal report As LocalReport)
Dim deviceInfo As String = "<DeviceInfo>
<OutputFormat>EMF</OutputFormat>
<PageWidth>8.5in</PageWidth>
<PageHeight>11in</PageHeight>
<MarginTop>0.25in</MarginTop>
<MarginLeft>0.25in</MarginLeft>
<MarginRight>0.25in</MarginRight>
<MarginBottom>0.25in</MarginBottom>
</DeviceInfo>"
Dim warnings As Warning() = Nothing
m_streams = New List(Of Stream)()
report.Render("Image", deviceInfo, AddressOf CreateStream, warnings)
For Each stream As Stream In m_streams
stream.Position = 0
Next
End Sub
Thanks in advance !!!
G.Waters
Continue reading...