פיתוח תוכנה ובניית אתרים תוכנה לעסקים






פיתוח תוכנה ובניית אתרי אינטרנט
תוכנות לעסקים פיתוח תוכנה ובניית אתרים
התחברות לקוחות
כניסת לקוחות

 
 
כניסת לקוחות

  שכחת את הסיסמה?
תוכנות לדוגמא



 
חברת PC GROUP מתמחה במתן פתרונות מיחשוב מתקדמים לעסקים ולפרטיים. פיתוח תוכנות תפורות ומותאמות לעסקים שונים. בניית אתרי תדמית, אתרי מכירות, אתרים פנימיים לניהול עסק ותחזוקת מערכות מחשבים בעסק. אנו מתמסרים ללקוחותינו ומשתדלים בכל כוחנו לספק את המוצר הטוב ביותר במחירים הוגנים.
יצירת קשר מידע על תוכנה 052-663-5054
PC GROUP
  ניתן ליצור קשר בטלפון בין השעות 19:00 - 8:00
מעבר לשעות הנ"ל ניתן ליצור קשר דרך האתר

  טופס יצירת קשר dot   כתובת מייל dot   קבל הצעת מחיר dot
מחשבמידע על תוכנה

Save string to image with printing quality
 
   private void StringToImage(string content)
    {
        int imageWidth = GetPixelsForPrinting(9.5f, 300);
        int imageHeight = GetPixelsForPrinting(6.5f, 300);
        int fontSize = PointsToPixels(26, 300);
        Font font = new Font("Arial", fontSize, FontStyle.Bold, GraphicsUnit.Pixel);
        
        using (Bitmap bitmap = new Bitmap(imageWidth, imageHeight))
        {            
            using (Graphics graphics = Graphics.FromImage(bitmap))
            {
                graphics.Clear(Color.White);
                graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
                graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
                graphics.CompositingQuality = CompositingQuality.HighQuality;
                graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
                graphics.DrawString(content, font, new SolidBrush(Color.Black), 0, 0);                
            }
            bitmap.SetResolution(300, 300);
            bitmap.Save("c:\\test.bmp"); 
        }

    }
    /// <summary>
    /// Calculates optimal image size in pixels for printing on specific paper size
    /// </summary>    
    /// <param name="dpi">Printer DPI quality (usually 300 or higher)</param>
    /// <returns></returns>
    private int GetPixelsForPrinting(float cmSize, int dpi)
    {
        return (int)Math.Round(cmSize * dpi / 2.54f, 0); // 1 inch = 2.54 cm (required because dpi is dots per INCH)
    }

    private int PointsToPixels(int pointsSize, int dpi)
    {
        return (int)Math.Round(pointsSize * dpi / 72f, 0); // 72 is the ppi - points per inch
    }




Post a comment
Your name:

Your comment:


 

מידע על תוכנה
מידע על תוכנה
בית תוכנה לעסקים ולפרטיים