Exemple #1
0
        bool ProtectCall(Action <PipelineInputPdfPage> callback, PipelineInputPdfPage pdfPage)
        {
            if (!g_continueOnException)
            {
                callback(pdfPage);
                return(true);
            }

            try
            {
                callback(pdfPage);
                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                System.Diagnostics.Debug.WriteLine(ex.ToString());

                bool hasOutput = (_pdfOutput != null);
                if (hasOutput)
                {
                    PipelineDebug.ShowException(this, ex);
                }

                StoreStatistics(new StatsExceptionHandled(pdfPage.GetPageNumber(), ex));
                StoreStatistics(pdfPage.GetPageNumber(), new StatsExceptionHandled(pdfPage.GetPageNumber(), ex));
            }

            return(false);
        }
Exemple #2
0
        public PipelinePage PrintWarnings()
        {
            var warnings = PdfReaderException.GetPageWarnings();

            if (warnings.Count() > 0)
            {
                PipelineDebug.ShowWarnings(this.ParentContext, warnings);
            }

            return(this);
        }
Exemple #3
0
        //static public PipelineText Output(this PipelineText page, string filename)
        //{
        //    PipelineDebug.Output(page.Context, filename);

        //    return page;
        //}

        static public PipelineText <T> DebugBreak <T>(this PipelineText <T> page, Func <PipelineText <T>, bool> condition = null)
        {
            PipelineDebug.DebugBreak(page, condition);

            return(page);
        }
Exemple #4
0
 static public PipelinePage ShowLine(this PipelinePage page, Color color)
 {
     PipelineDebug.ShowLine((PipelineInputPdf)page.Context, page.LastResult, color);
     return(page);
 }
Exemple #5
0
 static public PipelinePage DebugBreak(this PipelinePage page, Func <PipelinePage, bool> condition = null)
 {
     PipelineDebug.DebugBreak(page, condition);
     return(page);
 }
Exemple #6
0
 static public PipelinePage Output(this PipelinePage page, string filename)
 {
     PipelineDebug.Output((PipelineInputPdf)page.Context, filename);
     return(page);
 }
Exemple #7
0
        public PipelineText <TT> Show(Color Color)
        {
            PipelineDebug.Show((PipelineInputPdf)Context, CurrentStream, Color);

            return(this);
        }