所以,我有我的基本iTextSharp的代码与iTextSharp的使用e.DrawString保存为.PDF
private void button1_Click(object sender, EventArgs e)
{
Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("Test.pdf", FileMode.Create));
doc.Open();
doc.Add();
doc.Close();
}
现在我可以用
e.Graphics.DrawString(label1.Text, label1.Font, Brushes.Black, 13, 13);
吧?
我不这么认为iTextSharp对你来说是必须的吗?如果不是,那么PDfSharp将是很好的选择,可以做这样的事情。如果你想这样做,请告诉我。 – ridoy
@ridoy iTextSharp不是必须的。 Haw可以在PDFSharp中使用e.Graphics.DrawString吗? – user2162570
是你的问题“我如何将WinForms标签的内容写入PDF?” –