您是否嘗試過使用複選框的圖像(一個檢查和其他未選中),然後注入到這一點你的PDF,像這樣:
警告 - 我與iTextSharp
工作所以下面的代碼是有關到iTextSharp
,但這個概念應該翻譯成任何PDF生成庫/框架您使用
方法#1 - 將複選框圖像轉換成表格單元格
Dim imgCheckBoxChecked As Image = Image.GetInstance(HttpContext.Current.Server.MapPath("checkbox_checked.gif"))
Dim imgCheckBoxUnChecked As Image = Image.GetInstance(HttpContext.Current.Server.MapPath("checkbox_unchecked.gif"))
Dim table As Table
Dim cell As Cell
cell = New Cell(New Paragraph("", font))
'' Add checked or unchecked here
cell.AddElement(imgCheckBoxChecked)
cell.AddElement(imgCheckBoxUnChecked)
table.AddCell(cell)
方法#2 - 把複選框形象到文檔
'' Add checked or unchecked here
pdfDoc.Add(imgCheckBoxChecked)
pdfDoc.Add(imgCheckBoxUnChecked)
注意:您顯然需要找到或檢查,未經檢查創建.gif
圖像。
我會玩這個。不幸的是,我僅限於OpenOffice API。謝謝,如果我使用這種方法工作,我會報告回來。 –
有沒有辦法通過修改屬性集來完成它? –
@NewGuy - 對不起,我不熟悉OpenOffice API足以回答這個問題。 :-( –