stimulsoft mvc core如何动态报告图片大小

how image size dynamic report stimulsoft mvc core

我要将图像添加到 sitmul desinger 我想设置动态调整大小和 cangrow。还将大小页面报告更改为 a5 或 a4.. 如何解决这个问题我尝试 google 搜索但没有结果。

@Html.StiNetCoreViewer(new StiNetCoreViewerOptions()
{
    //Width = Unit.Pixel(794),
    //Height = Unit.Pixel(1123),

    //setPageFormat(200, 500, PageOrientation.PORTRAIT),
    Theme = Stimulsoft.Report.Web.StiViewerTheme.Office2013WhiteBlue,
    Localization = "Localization/fa.xml",
    Actions =
    {
        GetReport = "Print",
        ViewerEvent = "ViewerEvent",

    },
    Appearance =
        {
        RightToLeft=true,
            PageAlignment=Stimulsoft.Report.Web.StiContentAlignment.Center,
            BackgroundColor = System.Drawing.Color.White,
            PageBorderColor = System.Drawing.Color.Blue,
            ShowPageShadow = true,
            ScrollbarsMode = true,
          //  InterfaceType = Stimulsoft.Report.Web.StiInterfaceType.Auto

        },
    Exports =
        {
        ShowExportToDbf = false,
          ShowExportToDif = false,
          ShowExportToHtml= false,
          ShowExportToPowerPoint=false,
          ShowExportToCsv=false,
          ShowExportToDocument = false,
          ShowExportToExcel2007= false,
          ShowExportToImageBmp=false,
          ShowExportToRtf=false,
          ShowExportToImageSvgz=false,
        },


})

嗨,我已经解决了这个问题

 foreach (StiPage page in report.Pages)
            {
                page.Orientation = StiPageOrientation.Portrait;
                page.Margins.Top = 0;
                page.Margins.Bottom = 0;
                page.Margins.Left = 0;
                page.Margins.Right = 0;
                page.PaperSize = System.Drawing.Printing.PaperKind.A4;

            }
 StiReport report = new StiReport();
  var image = report.GetComponentByName("Image1") as StiImage;
  image.CanGrow =false ;    
 image.Width = 120;