Page 1 of 1

Printing without extra margins and URI

Posted: Sat Aug 06, 2016 3:52 am
by beginner
Hi,

I'm using `StiMvcViewer` to show reports in my MVC 5 application; When user prints the page, with or without preview, URI will be printed on page too, that takes a lot of margin and is really unusable.


I've attached an example page printed to OneNote, but printing on paper is exactly the same.


Here is my viewer configuration, if that's important.

Code: Select all

    @Html.Stimulsoft().StiMvcViewer(repName, new StiMvcViewerOptions
{
    ActionInteraction = "Interaction",
    ActionPrintReport = "PrintReport",
    ActionViewerEvent = "ViewerEvent",
    ActionExportReport = "ExportReport",
    ActionGetReportSnapshot = "Load",
    Controller = "../Report",

    DefaultExportSettings = new
    {
        UseOnePageHeaderAndFooter = true,
        ExportObjectFormatting = false,
        ExportDataOnly = true,
        ColumnsRightToLeft = true
    },
    
    Width = Unit.Point(700),
    ScrollbarsMode = true,

    ServerTimeout = TimeSpan.FromMinutes(3),
    Localization = "~/Content/Reporting/fa.xml",
    Theme = StiTheme.Windows7,
    ShowTooltips = false,
    Height = Unit.Point(1000),
    MenuShowMode = StiShowMenuMode.Hover,
    PageAlignment = StiContentAlignment.Center,
    ShowExportDialog = false,
    ToolbarAlignment = StiContentAlignment.Center,
    RightToLeft = false,

    ShowExportToCsv = true
})

Re: Printing without extra margins and URI

Posted: Mon Aug 08, 2016 12:44 pm
by HighAley
Hello.

Unfortunately, the browsers don't give access to the print settings.
So you should disable the Headers and Footers in browser's print settings.
Also, please, set the right page size. It should be the same as you set in report template.
Try to change the Margins in the same settings.

Thank you.