我需要使用 itextsharp 构建一个 pdf。目前我的问题是我无法将表格边框宽度设为 0px。我不想要表格或单元格边框..我的代码是
Document Doc = new Document();
//PdfWriter.GetInstance(Doc, new FileStream(Environment.GetFolderPath
//(Environment.SpecialFolder.Desktop) + "\\TTS_Bill.pdf", FileMode.Create));
PdfWriter.GetInstance(Doc, new FileStream(Server.MapPath("~/DMSDOC/DMS_doc.pdf"), FileMode.Create));
Doc.Open();
PdfPTable table = new PdfPTable(1);
table.DefaultCell.Border = PdfPCell.NO_BORDER;
table.TotalWidth = 400f;
table.LockedWidth = true;
iTextSharp.text.Image logo = iTextSharp.text.Image.GetInstance("~/img/val verde hospital.png");
logo.ScaleAbsolute(40, 40);
PdfPCell image_header = new PdfPCell(logo);
image_header.HorizontalAlignment = Element.ALIGN_CENTER;
table.AddCell(image_header)
如何解决或我的代码中有任何错误...