예제 #1
0
        /// <summary>
        /// Create new instance of HtmlToPdfConverter
        /// </summary>
        public HtmlToPdfConverter()
        {
            License = new LicenseInfo();

#if NET_STANDARD
            string rootDir = null;
#else
            string rootDir = AppDomain.CurrentDomain.BaseDirectory;
#endif

#if !LIGHT
            if (HttpContext.Current != null)
            {
                //  rootDir = HttpRuntime.AppDomainAppPath + "bin";
                rootDir = HttpRuntime.AppDomainAppPath + "pdftool";
            }
#endif

            PdfToolPath        = rootDir;
            TempFilesPath      = null;
            WkHtmlToPdfExeName = "wkhtmltopdf.exe";
            Orientation        = PageOrientation.Default;
            Size       = PageSize.Letter;
            LowQuality = false;
            Grayscale  = false;
            Quiet      = true;
            Zoom       = 1.0F;
            Margins    = new PageMargins();
        }
예제 #2
0
 /// <summary>
 /// Create new instance of HtmlToPdfConverter
 /// </summary>
 public HtmlToPdfConverter(string rootDir)
 {
     License            = new LicenseInfo();
     PdfToolPath        = rootDir;
     TempFilesPath      = rootDir;        /* [dlatikay 20180926] there's for the temp files to go, we don't use c:\windows\temp */
     WkHtmlToPdfExeName = "wkhtmltopdf.exe";
     Orientation        = PageOrientation.Default;
     Size       = PageSize.Default;
     LowQuality = false;
     Grayscale  = false;
     Quiet      = true;
     Zoom       = 1.0F;
     Margins    = new PageMargins();
 }