disable/suppress warning, info, debug message

Sep 19, 2011 at 9:16 PM

How to disable/suppress warning, info, debug message when I run a program? here is my code:

         FonetDriver driver = FonetDriver.Make();

         driver.Render("../../BY_MONTH_129186.fo", "../../BY_MONTH_129186.pdf");

 

here is out put:

[INFO] Building formatting object tree
[WARN] Will ignore TrueType font 'Symbol' because a base 14 font with the same n
ame already exists.
[INFO] [1]
[WARN] Sum of fixed column widths 530000 greater than maximum specified IPD 5160
00
[WARN] Area contents overflows area
[WARN] Area contents overflows area
[WARN] Area contents overflows area
[WARN] Area contents overflows area
[WARN] Area contents overflows area
[WARN] Area contents overflows area
[WARN] Area contents overflows area
[INFO] Last page-sequence produced 1 page(s).
[INFO] Parsing of document complete, stopping renderer

 

I don't want these message display when I run the program because it will effect my web page out put.

 

-Henry

Coordinator
Sep 22, 2011 at 8:44 AM

Hello

If you add a handler to the OnError, OnWarning and OnInfo handlers, then FO.NET will not output to the console and will instead assume that you have notified the end-user in some other way.

See FonetDriver.cs methods FireFonetError, FireFonetWarning and FireFonetInfo.

http://fonet.codeplex.com/SourceControl/changeset/view/69243#167196

Mark