コード例 #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);