예제 #1
0
파일: PdfReader.cs 프로젝트: Kwesoft/Pdf
        public decimal ReadVersion()
        {
            var content = _document.Encoding.GetString(_document.Read(0, _document.Find(2, window => window[0] == 10 && window[1] != 37)));

            switch (content.Split('\n')[0])
            {
            case "%PDF-1.4": return(1.4M);

            default: throw new Exception("Invalid document");
            }
            ;
        }
예제 #2
0
 internal static int Find(this IEditablePdfDocument document, byte[] lookFor) => document.Find(lookFor, 0);
예제 #3
0
 internal static int Find(this IEditablePdfDocument document, byte[] lookFor, int start) => document.Find(lookFor.Length, w => w.ByteEquals(lookFor), start);