如何从 MemoryStream 或 Byte 获取页面大小?

发布于 2024-08-31 01:59:12 字数 209 浏览 2 评论 0原文

我在数据库中有活动报告的图像,当我进入字节并转换为内存流时,它可以传递到活动报告查看器,那么我如何获取活动报告中纸张显示的纸张大小? 我的代码:

 Dim repmem As New System.IO.MemoryStream(rptBytes)
 repmem.Position = 0
 Viewer1.Document.Load(repmem)

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.Load(repmem)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你的心境我的脸 2024-09-07 01:59:12

每个文档页面都有自己的大小,可以通过以下方式访问:document.Pages(0).Size

Every document page has its own size which could be accessed as:document.Pages(0).Size

那片花海 2024-09-07 01:59:12

请参阅 Page.Width ActiveReports 在线帮助中的属性
你的代码将类似于:

 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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文