예제 #1
0
 public virtual void Customize(IHtmlToPdfOptions options)
 {
     // you may customize HTML to PDF converter (WKHTML) parameters here, e.g.
     options.Landscape     = false;
     options.PageSize      = "A4";
     options.MarginsAll    = "1.2cm";
     options.FooterHtmlUrl = GetBaseUrl() + "Modules/_Ext/Reporting/ReportFooter.html";
 }
예제 #2
0
        public void Customize(IHtmlToPdfOptions options)
        {
            // you may customize HTML to PDF converter (WKHTML) parameters here, e.g.
            // options.MarginsAll = "2cm";
            //options.PageSize = "A4";
            options.MarginTop         = "0.4cm";
            options.MarginLeft        = "1.5cm";
            options.MarginRight       = "1.5cm";
            options.MarginBottom      = "0.2cm";
            options.UsePrintMediaType = true;

            options.SmartShrinking = true;
        }
예제 #3
0
        public void Customize(IHtmlToPdfOptions options)
        {
            // you may customize HTML to PDF converter (WKHTML) parameters here, e.g.
            options.MarginLeft = "2cm";
            options.MarginTop  = "1cm";

            // Get path of App_Data\Reporting, that is the folder where I have header.html and footer.html files
            string PhisicalPath = Path.Combine(System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath,
                                               @"App_Data\Reporting\");

            //options.CustomArgs.Add("--header-html");
            //options.CustomArgs.Add(PhisicalPath + "header.html");

            options.CustomArgs.Add("--footer-html");
            options.CustomArgs.Add(PhisicalPath + "FooterInvoice.html");

            options.CustomArgs.Add("--disable-smart-shrinking");
        }
예제 #4
0
        public void Customize(IHtmlToPdfOptions options)
        {
            options.FooterHeaderReplace.Add("languageId", OffersLanguageHelpers.getCurrentUIlanguageID().ToString());
            options.FooterHeaderReplace.Add("languageCode", LanguageId);
            options.FooterHeaderReplace.Add("offerId", OfferId.ToString());

            // you may customize HTML to PDF converter (WKHTML) parameters here, e.g.
            //options.MarginLeft = "2cm";
            //options.MarginRight = "1cm";
            //options.MarginTop = "1cm";
            //options.MarginBottom = "1cm";
            var uriForProtocol = new Uri(options.Url.ToString()).GetLeftPart(UriPartial.Authority);

            options.CustomArgs.Add("--header-html");
            options.CustomArgs.Add(uriForProtocol + "/Offers/Offers/Header");
            options.CustomArgs.Add("--footer-html");
            options.CustomArgs.Add(uriForProtocol + "/Offers/Offers/Footer");

            // options.CustomArgs.Add("--disable-smart-shrinking");
        }
예제 #5
0
 public void Customize(IHtmlToPdfOptions options)
 {
     // you may customize HTML to PDF converter (WKHTML) parameters here, e.g.
     // options.MarginsAll = "2cm";
 }
예제 #6
0
 public void Customize(IHtmlToPdfOptions options)
 {
     options.MarginsAll = "2cm";
     options.PageSize   = "A4";
 }
 public void Customize(IHtmlToPdfOptions options)
 {
     // you may customize HTML to PDF converter (WKHTML) parameters here, e.g.
     // converter.MarginsAll = "2cm";
 }
 public void Customize(IHtmlToPdfOptions options)
 {
     options.MarginTop = "2cm";
 }