2017-02-08 1 views
1

abcpdf 및 C#을 사용하여 PDF 양식 필드에서 사용되는 글꼴을 동적으로 변경하는 방법은 무엇입니까? 스택 오버플로C#에서 abcpdf를 사용하여 PDF 양식 필드에서 글꼴 스타일을 변경하는 방법은 무엇입니까?

+0

에 오신 것을 환영합니다. http://stackoverflow.com/help/how-to-ask를 읽고 귀하가 시도한 내용으로 질문을 업데이트하십시오. 당신이 붙어 있다면, 당신은 확실히 여기에 도움을 찾을거야! –

답변

1

See here:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Drawing; 
using System.Text; 
using System.Net; 
using System.IO; 
using WebSupergoo.ABCpdf8; 

namespace ABCpdfExamples 
{ 
    public partial class test : System.Web.UI.Page 
    { 
      protected void Page_Load(object sender, EventArgs e) 
     {   
      // ---- Adds a font reference to the document ---- 
      Doc doc = new Doc(); 
      doc.FontSize = 48; 
      string theFont = "Times-Roman "; 
      doc.Font = doc.AddFont(theFont); 
      doc.AddText(theFont); 
      theFont = "Helvetica-Bold"; 
      doc.Font = doc.AddFont(theFont); 
      doc.AddText(theFont); 
      doc.Save(Server.MapPath("~/Results/Output.pdf")); 
      doc.Clear(); 
     } 
    } 
} 
+0

간단하고 정확한 답변 @ c-Helling에 감사드립니다. –

관련 문제