Пример #1
0
        private PdfString GetRicPosition(PDFDoc doc, string pattern, int page)
        {
            try
            {
                List <PdfString> ricPosition = null;
                ricPosition = pa.RegexSearchByPage(doc, pattern, page);
                if (ricPosition == null || ricPosition.Count == 0)
                {
                    Logger.Log(string.Format("there is no ric title found by using pattern:{0} to find the ric title ,in the page:{1} of the pdf:{2}"));
                    return(null);
                }

                return(ricPosition[0]);
            }
            catch (Exception ex)
            {
                string msg = string.Format("\r\n	     ClassName:  {0}\r\n	     MethodName: {1}\r\n	     Message:    {2}",
                                           System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString(),
                                           System.Reflection.MethodBase.GetCurrentMethod().Name,
                                           ex.Message);
                Logger.Log(msg, Logger.LogType.Error);
                throw;
            }
        }