コード例 #1
0
        private static PdfTextOut ParseBytes(IPdfParser pdfParser, byte[] bytes)
        {
            var input  = new PdfIn(bytes);
            var output = pdfParser.Parse(input);

            return(output);
        }
コード例 #2
0
        public PdfTextOut Parse(PdfIn input)
        {
            var reader        = new PdfReader(input.Data);
            var numberOfPages = reader.NumberOfPages;

            var sb = new StringBuilder();

            for (var currentPageIndex = 1; currentPageIndex <= numberOfPages; currentPageIndex++)
            {
                sb.Append(PdfTextExtractor.GetTextFromPage(reader, currentPageIndex));
            }

            return(new PdfTextOut(sb.ToString()));
        }