本文介绍了如何使用itextsharp设置字体大小,粗体和校准字体...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改我的代码... plz help ...



protected void Button2_Click(object sender,EventArgs e)

{

String pathin =E:\\pdf\\so\\22.pdf;

String pathout =E:\\ \\\pdf\\ so \\rere.pdf;

PdfReader reader = new PdfReader(pathin);

PdfStamper stamper = new PdfStamper(reader ,new FileStream(pathout,FileMode.Create));

PdfContentByte pbover = stamper.GetOverContent(1);



string text =如何blod和设置字体大小;

ColumnText.ShowTextAligned(pbover,Element.ALIGN_LEFT,新词组(文本,新iTextSharp.text.Font(){Size = 10}),71,648 ,0);



stamper.Close();

}

How to change below my code...plz help...

protected void Button2_Click(object sender, EventArgs e)
{
String pathin = "E:\\pdf\\so\\22.pdf";
String pathout = "E:\\pdf\\so\\1rere.pdf";
PdfReader reader = new PdfReader(pathin);
PdfStamper stamper = new PdfStamper(reader, new FileStream(pathout, FileMode.Create));
PdfContentByte pbover = stamper.GetOverContent(1);

string text ="How to blod and set font size";
ColumnText.ShowTextAligned(pbover, Element.ALIGN_LEFT, new Phrase(text, new iTextSharp.text.Font() { Size = 10 }), 71, 648, 0);

stamper.Close();
}

推荐答案


这篇关于如何使用itextsharp设置字体大小,粗体和校准字体...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-23 21:34