图像大小如何动态报告stimulsoft mvc核心

时间:2019-07-07 10:40:53

标签: model-view-controller core stimulsoft

我将图像添加到sitmul desinger中,我想设置动态调整大小和Cangrow的设置。还可以将大小页面报告更改为a5或a4 ..如何解决此问题,请尝试使用Google serach,但不会导致结果。

@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,
        },


})

1 个答案:

答案 0 :(得分:0)

hi iam解决了这个问题

 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;