Пример #1
0
        public static Bitmap DebugUnit()
        {
            MiniHtml mh = MiniHtml.FromString("QzMiniHtml.Net (c) 2005-2006 Leung Yat Chun Joseph", 200);

            mh.documentOutput.Update();

            Bitmap b = new Bitmap(mh.widthLimit, (Int32)(mh.documentOutput.Height()));

            ((GraphicsOutputType)(mh.documentOutput)).outputGraphics = Graphics.FromImage(b);
            ((GraphicsOutputType)(mh.documentOutput)).outputGraphics.FillRectangle(Brushes.Wheat,
                                                                                   new RectangleF(0, 0, mh.widthLimit, mh.documentOutput.Height()));


            mh.documentOutput.Output();
            mh.documentOutput.PrintItems();

            //b.Save("MiniHtml.Debug.bmp");
            return(b);
        }
Пример #2
0
 /// <summary>
 /// Parse Html from string
 /// </summary>
 public static MiniHtml FromString(string html, Int32 width)
 {
     return(MiniHtml.FromString(html, "", width));
 }