Example #1
0
        private BarCodeReader BarCodeReaderPdf(String filename)
        {
            //Set license for Aspose.BarCode
            Aspose.BarCode.License licenceBarCode = new Aspose.BarCode.License();
            licenceBarCode.SetLicense(@"X:\awnet\TestData\Licenses\Aspose.Total.lic");

            //bind the pdf document
            Aspose.Pdf.Facades.PdfExtractor pdfExtractor = new Aspose.Pdf.Facades.PdfExtractor();
            pdfExtractor.BindPdf(filename);

            //set page range for image extraction
            pdfExtractor.StartPage = 1;
            pdfExtractor.EndPage   = 1;

            pdfExtractor.ExtractImage();

            //save image to stream
            MemoryStream imageStream = new MemoryStream();

            pdfExtractor.GetNextImage(imageStream);
            imageStream.Position = 0;

            //recognize the barcode from the image stream above
            BarCodeReader barcodeReader = new BarCodeReader(imageStream, DecodeType.QR);

            while (barcodeReader.Read())
            {
                Console.WriteLine("Codetext found: " + barcodeReader.GetCodeText() + ", Symbology: " + barcodeReader.GetCodeType());
            }

            //close the reader
            barcodeReader.Close();

            return(barcodeReader);
        }
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
            // Set License of Aspose.Cells
            Aspose.Pdf.License lic = new Aspose.Pdf.License();
            lic.SetLicense("D:\\Licenses\\Aspose.Total.Product.Family.lic");

            Aspose.BarCode.License lic2 = new Aspose.BarCode.License();
            lic2.SetLicense("D:\\Licenses\\Aspose.Total.Product.Family.lic");
        }
Example #3
0
        internal static void SetUnlimitedLicense()
        {
            // This is where the test license is on my development machine.
            string testLicenseFileName = Path.Combine(LicenseDir, "Aspose.Total.NET.lic");

            if (File.Exists(testLicenseFileName))
            {
                // This shows how to use an Aspose.Words license when you have purchased one.
                // You don't have to specify full path as shown here. You can specify just the
                // file name if you copy the license file into the same folder as your application
                // binaries or you add the license to your project as an embedded resource.
                License wordsLicense = new License();
                wordsLicense.SetLicense(testLicenseFileName);

                Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
                pdfLicense.SetLicense(testLicenseFileName);

                Aspose.BarCode.License barcodeLicense = new Aspose.BarCode.License();
                barcodeLicense.SetLicense(testLicenseFileName);
            }
        }
Example #4
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            ModelBinders.Binders.Add(typeof(DateTime), new CustomDateBinder());
            ModelBinders.Binders.Add(typeof(DateTime?), new NullableCustomDateBinder());

            Stream stream = new MemoryStream(StrToByteArray(Resources.Licence));

            stream.Position = 0;
            Aspose.Pdf.License     licensePdf     = new Aspose.Pdf.License();
            Aspose.Words.License   licenseWords   = new Aspose.Words.License();
            Aspose.Cells.License   licenseCells   = new Aspose.Cells.License();
            Aspose.Slides.License  licenseSlides  = new Aspose.Slides.License();
            Aspose.BarCode.License licenseBarCode = new Aspose.BarCode.License();

            licensePdf.SetLicense(stream);
            stream.Position = 0;
            licenseWords.SetLicense(stream);
            stream.Position = 0;
            licenseCells.SetLicense(stream);
            stream.Position = 0;
            licenseSlides.SetLicense(stream);
            stream.Position = 0;
            licenseBarCode.SetLicense(stream);
            stream.Close();
            //   CreateLogins();

            //	CheckLogins();

            LogHelper.InitLogger();
            LogHelper.Log.Info("Application Start");

            EmployePermissionHelper.Init();


            QScheduler.Start();
        }
        protected void Application_Start()
        {
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            ConfigurationValues.DeskTopConnection = System.Configuration.ConfigurationManager.AppSettings["deskTopConnection"];            
            ConfigurationValues.WaldenFaxConnection = System.Configuration.ConfigurationManager.AppSettings["fax"];
            ConfigurationValues.TemporaryFaxPath = System.Configuration.ConfigurationManager.AppSettings["termporaryFaxPath"];
            ConfigurationValues.WhereToCopyPDfTo = System.Configuration.ConfigurationManager.AppSettings["whereToCopyPDFTo"];
            ConfigurationValues.PdfFolder = System.Configuration.ConfigurationManager.AppSettings["pdfFolder"];
            ConfigurationValues.PernamentFaxPath = System.Configuration.ConfigurationManager.AppSettings["pernamentFaxPath"];
            ConfigurationValues.ApplicationPath = System.Configuration.ConfigurationManager.AppSettings["applicationPath"];
            ConfigurationValues.UseNine = System.Configuration.ConfigurationManager.AppSettings["useNine"];
            ConfigurationValues.ReviewDocumentPath = System.Configuration.ConfigurationManager.AppSettings["reviewDocumentPath"];
            ConfigurationValues.ProcessDocumentPath = System.Configuration.ConfigurationManager.AppSettings["processDocumentPath"];
            ConfigurationValues.GreenwayConnection = System.Configuration.ConfigurationManager.AppSettings["greenwayConnection"];
            ConfigurationValues.PathToWorkingFolder = System.Configuration.ConfigurationManager.AppSettings["pathToWorkingFolder"];
            ConfigurationValues.PathToErrorFolder = System.Configuration.ConfigurationManager.AppSettings["pathToErrorFolder"];
            ConfigurationValues.PathToViewErrorFolder = System.Configuration.ConfigurationManager.AppSettings["pathToViewErrorFolder"];
            ConfigurationValues.ViewErrorDocumentPath = System.Configuration.ConfigurationManager.AppSettings["viewErrorDocumentPath"];
            ConfigurationValues.PathToArchiveFolder = System.Configuration.ConfigurationManager.AppSettings["pathToArchiveFolder"];


            ConfigurationValues.Application = System.Configuration.ConfigurationManager.AppSettings["application"];
            ConfigurationValues.EmailFrom = System.Configuration.ConfigurationManager.AppSettings["emailFrom"];
            ConfigurationValues.EmailFromFriendly = System.Configuration.ConfigurationManager.AppSettings["emailFromFriendly"];
            ConfigurationValues.EmailSendTo = System.Configuration.ConfigurationManager.AppSettings["emailSendTo"];
            ConfigurationValues.EmailSendToFriendly = System.Configuration.ConfigurationManager.AppSettings["emailSendToFriendly"];
            ConfigurationValues.EmailSubject = System.Configuration.ConfigurationManager.AppSettings["emailSubject"];
            ConfigurationValues.SmtpHost = System.Configuration.ConfigurationManager.AppSettings["smtpHost"];
            ConfigurationValues.SmtpPort = System.Configuration.ConfigurationManager.AppSettings["smtpPort"];
            ConfigurationValues.SmtpHostPassword = System.Configuration.ConfigurationManager.AppSettings["smtpHostPassword"];


            Aspose.Pdf.License pdflicense = new Aspose.Pdf.License();
            pdflicense.SetLicense(System.Configuration.ConfigurationManager.AppSettings["aposePDFLicense"]);
            pdflicense.Embedded = true;

            Aspose.BarCode.License barCodeLicense = new Aspose.BarCode.License();
            barCodeLicense.SetLicense(System.Configuration.ConfigurationManager.AppSettings["aposeBarCodeLicense"]);
        }
        private BarCodeReader BarCodeReaderPdf(string filename)
        {
            //Set license for Aspose.BarCode
            Aspose.BarCode.License licenceBarCode = new Aspose.BarCode.License();

            licenceBarCode.SetLicense(@"X:\awnet\TestData\Licenses\Aspose.Total.lic");

            //bind the pdf document
            Aspose.Pdf.Facades.PdfExtractor pdfExtractor = new Aspose.Pdf.Facades.PdfExtractor();
            pdfExtractor.BindPdf(filename);

            //set page range for image extraction
            pdfExtractor.StartPage = 1;
            pdfExtractor.EndPage = 1;

            pdfExtractor.ExtractImage();

            //save image to stream
            MemoryStream imageStream = new MemoryStream();
            pdfExtractor.GetNextImage(imageStream);
            imageStream.Position = 0;

            //recognize the barcode from the image stream above
            BarCodeReader barcodeReader = new BarCodeReader(imageStream, DecodeType.QR);
            while (barcodeReader.Read())
            {
                Console.WriteLine("Codetext found: " + barcodeReader.GetCodeText() + ", Symbology: " + barcodeReader.GetCodeType());
            }

            //close the reader
            barcodeReader.Close();

            return barcodeReader;
        }