我創建一個PDF文件,並通過郵件發送,現在我把更多的時間,我得到這個錯誤PDF問題關閉選項C#的winform
過程.....因爲它被另一個beingused過程
Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
try
{
PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("c:\\Test11.pdf",FileMode.Create));
doc.Open;
Paragraph paragraph = new Paragraph("This is my first line using Paragraph.");
Phrase pharse = new Phrase("This is my second line using Pharse.");
Chunk chunk = new Chunk(" This is my third line using Chunk.");
doc.Add(paragraph);
doc.Add(pharse);
doc.Add(chunk);
}
catch (DocumentException dex)
{
}
finally
{
doc.Close();
}
你能粘貼你的代碼嗎?你是如何製作pdf文件的? – mqpasta 2011-06-09 09:32:41
與itextSharp DLL我的問題是我如何關閉此文件? – mnaftal 2011-06-09 09:36:40