using (MemoryStream stream1 = new MemoryStream())
{
Paragraph p2 = new Paragraph(new Chunk(new iTextSharp.text.pdf.draw.LineSeparator(0.0F, 100.0F, iTextSharp.text.Color.BLACK, Element.ALIGN_LEFT, 1)));
pdfDoc.Add(p2);
pdfDoc.Add(new Phrase("\n"));
pdfDoc.Add(new Phrase("\n"));
PieChart.SaveImage(stream1, ChartImageFormat.Png);
iTextSharp.text.Image chartImage1 = iTextSharp.text.Image.GetInstance(stream1.GetBuffer());
chartImage1.ScalePercent(75f); chartImage1.SpacingBefore = 100f;
chartImage1.SpacingAfter = 110f;
pdfDoc.Add(chartImage1); pdfDoc.Add(new Phrase("\n"));// pdfDoc.Add(new Phrase("\n")); pdfDoc.Add(new Phrase("\n"));
//byte[] bytes1 = stream.ToArray();
}
C#打印分辨率较差的条形图图像,此条形图有大量数据,因此用户将无法读取它,因此我需要另一种好方法来做到这一点
谢谢