Как динамически изменить шрифт, используемый в поле формы pdf, с помощью abcpdf и c #?
Как изменить стиль шрифта в поле формы PDF с помощью abcpdf в с #?
comment
Добро пожаловать в Stack Overflow. Пожалуйста, прочтите stackoverflow.com/help/how-to-ask и обновите свой вопрос, используя то, что вы пробовали. Если вы застряли, то обязательно найдете здесь помощь!
- person Prageeth Saravanan   schedule 08.02.2017
Ответы (1)
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();
}
}
}
person
C. Helling
schedule
08.02.2017
Большое спасибо за простой и точный ответ @ c-Helling
- person Visual Modules; 14.02.2017