public bool SendToPrint(PrintForm form,string printerName =null)
        {
            this.pdfFileName = form.FilePath;
            this.printerName = printerName;
            PrintManagerService.adobeReaderPath = ConfigurationSettings.AppSettings["adobeReaderPath"];// @"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe";
            var extension = Path.GetExtension(this.pdfFileName);

            return extension.ToLower().Contains(".txt") && UseDefaultPrinter ?
             PrintTextFile(): Print();
        }
        public bool GenerateDocument(PrintForm form)
        {
            var config = new PrintConfig()
            {
                EvictionIds = new string[] { form.EvictionId },
                Forms = new string[] { form.FormName },
                PrintCount = new string[] { form.Copies },
                SelectedAttorney = form.Attorney,
                UserId = form.UserId,
                ParentUserId = form.ParentUserId,
                TemplateFolder =ConfigurationSettings.AppSettings["TemplateFolder"],//  @"E:\CASS TFS\Eviction  Site\Eviction_v1.0-Printing Tool\website\nwe2.0",
                MappingFolder = ConfigurationSettings.AppSettings["MappingFolder"] ,
                UserType = form.UserType ,
                ReIssueCheck =!string.IsNullOrEmpty(form.ReIssueCheck )&& Convert.ToBoolean( form.ReIssueCheck),

            };

            try
            {
               //form.FilePath =  PrintingTool.Print(config);
               // conectar la forma en la que se genera el documento.

                return !string.IsNullOrEmpty(form.FilePath);
            }
            catch (Exception ex)
            {
                ex.WriteLog();
                return false;
            }
        }