How get page size from MemoryStream or Byte?
I have images of active report in database, when i get into bytes and convert into memory stream so it can pass to active report viewer then how i get paper size of paper display in active report? My code :
Dim repmem As New System.IO.MemoryStream(rptBytes)
repmem.Position = 0
Viewer1.Document.Lo开发者_运维百科ad(repmem)
Every document page has its own size which could be accessed as:document.Pages(0).Size
See the Page.Width property in the ActiveReports Online Help. Your code will be something like:
Dim repmem As New System.IO.MemoryStream(rptBytes)
repmem.Position = 0
Viewer1.Document.Load(repmem)
Dim pageWidth as Single
pageWidth = Viewer1.Document.Pages(0).Width
精彩评论