Example #1
0
        private static PDFFileData GetData(DbPDFDocument sourceDocument, byte[] data)
        {
            if (data == null)
            {
                return(sourceDocument.Data);
            }

            var fileData = sourceDocument?.Data ?? new PDFFileData();

            fileData.Content       = data;
            fileData.ExtractedText = PDFParser.ExtractTextFromPdf(data);
            return(fileData);
        }