コード例 #1
0
ファイル: Program.cs プロジェクト: StolarQQ/RedisFun
        static void Main(string[] args)
        {
            //await RedisInit();

            //#region PDF

            //var bytePdf = new byte[1];
            //var inStream = new MemoryStream(bytePdf);
            //File.WriteAllBytes("C:\\Users\\Lyns\\Desktop\\Test123.pdf", bytePdf);


            //// Simple check if file is pdf
            //var pdfTool = new PdfTools();
            //var desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            //Console.WriteLine(pdfTool.IsPdf($"{desktopPath}/Test123.pdf"));


            //// Create blank pdf
            //var stream = new MemoryStream();
            //var pdf = new PdfDocument();
            //var page = pdf.AddPage();
            //pdf.Save(stream, false);
            //pdf.Close();
            //var resultPdf = stream.ToArray();

            //// Write pdf
            //File.WriteAllBytes("C:\\Users\\Lyns\\Desktop\\Stolar.pdf", resultPdf);


            //var randombytePdf = new byte[1];
            //File.WriteAllBytes($"{desktopPath}/Rafał.pdf", randombytePdf);
            //File.ReadAllBytes("");


            //var pdfTools = new PdfTools();
            //pdfTools.MergePdfs(new[]
            //{
            //    $"{desktopPath}/xD.pdf",
            //    $"{desktopPath}/ReSharper_DefaultKeymap_VSscheme.pdf"

            //});

            //var fs = new FileStream($"{desktopPath}/xD1.pdf", FileMode.Create, FileAccess.Write, FileShare.None);
            //var openpdf = PdfReader.Open(inStream, PdfDocumentOpenMode.Import);

            //#endregion

            var excel = new ExcelService();

            excel.CreateXlsFile();


            Console.ReadKey();
        }