2009-09-11 4 views
0

ASP.NET MVC를 사용하여 동적 포럼 서명 생성기를 어떻게 만들 수 있습니까? 현재 Forum Signature에 사용될 사용자 정보를 검색하는 Stats fetcher가 있습니다.ASP.NET 동적 게임 포럼 서명

나는 사용자가 자신의 사용자 이름을 입력하고 모든 사람의 통계를 표시하는 포럼 서명에 넣을 수있는 이미지를 생성 할 수있는 포럼 서명 생성기를 만들려고합니다.

나는 내가 공급 등 약간의 정보를 의미하지 않았다 무엇을하고 있었는지를 추적 손실이 있어야이 http://www.xfire.com/miniprofile

같은,하지만 난 당신이 지금 뭘하려고 무엇 메신저의 아이디어가 생각 ..

+2

아마도 뭔가를 놓친 것 같지만 그보다 더 많은 정보가 필요하다고 생각합니다. –

+1

그래, 나도 동의한다. 설명하고 어떻게 작동하는지 자세히 설명해주십시오. 아직이 프로젝트를 계획하지 않았다는 느낌이 들지 않습니까? 세부 사항은 우리가 당신을 도울 수 있도록 도와 줄 것입니다. 감사! –

답변

1

abcPdf 구성 요소를 사용하면 이미지는 고해상도 PDF 문서가됩니다.

당신은 당신이 JPG 스트림

기본 아이디어로 PDF를 렌더링 당신이 가야 할 다음 w 텍스트, 글꼴, 색상, X, Y, H

을 통과해야 다음 할 수 이것 같이 있으십시오; 텍스트를 추가하는 코드를이고 또한 스트림 JPG 아주 아주 좋은 구성 요소로 PDF를 렌더링하는

 private void addTextToPDF(string cmyk, int fs, string fontname, Double posx, 
    Double posY, Double mWidth, Double mHeight, String text, Double hpos) 
    { 
     text = secure.reverseCleanup(text); 
     int lettercount1 = 0; 
     foreach (char c in text) 
     { lettercount1 ++; } 

     TheDoc.Color.String = cmyk; 
     TheDoc.FontSize = fs; 
     var theFont = fontname; 
     TheDoc.Rect.Position(posx, posY); 
     TheDoc.Rect.Width = mWidth; 
     TheDoc.Rect.Height = mHeight; 
     TheDoc.HPos = hpos; 
     TheDoc.Font = TheDoc.EmbedFont(theFont, "Latin", false, true, true); 
     int didwrite = TheDoc.AddText(text); 
     string addedchars = TheDoc.GetInfo(didwrite, "Characters"); 
     var oldid = didwrite; 

     if (addedchars != lettercount1.ToString()) 
      didwrite = 0; 

     while (didwrite==0) // hits this if first run did not add text 
     { 
      TheDoc.Delete(oldid); 
      fs = fs - 2; 
      TheDoc.Color.String = cmyk; 
      TheDoc.FontSize = fs; 
      theFont = fontname; 
      TheDoc.Rect.Position(posx, posY); 
      TheDoc.Rect.Width = mWidth; 
      TheDoc.Rect.Height = mHeight; 
      TheDoc.HPos = hpos; 
      TheDoc.Font = TheDoc.EmbedFont(theFont, "Latin", false, true, true); 
      didwrite = TheDoc.AddText(secure.reverseCleanup(text)); 
      addedchars = TheDoc.GetInfo(didwrite, "Characters"); 
      oldid = didwrite; 

      if (addedchars != lettercount1.ToString()) 
       didwrite = 0; 
     } 

    } 

    public byte[] convertPDFToImageStream() 
    { 
     byte[] jpgBytes = null; 
     byte[] theData = null; 
     theData = TheDoc.GetData(); 
     TheDoc.Clear(); 
     TheDoc.Read(theData); 
     TheDoc.Rendering.DotsPerInch = getDPI(); 
     TheDoc.Rendering.ColorSpace = "RGB"; 
     jpgBytes = TheDoc.Rendering.GetData("preview.jpg"); 

     return jpgBytes; 
    } 

.