-2
我想打印一些段落,並使用流文件的圖像,如圖代碼如下System.InvalidOperationException:特定元素已經是另一個元素的邏輯子元素。斷開是第一
Paragraph invoiceID = new Paragraph(new Run("Invoice No : "+ txtInvoiceID.Text));
Paragraph qty001 = new Paragraph(new Run("Quantity : " + qtyText.Text));
Paragraph date001 = new Paragraph(new Run("Date : " +txtInvoiceDate.Text));
Section sec = new Section();
sec.Blocks.Add(invoiceID);
sec.Blocks.Add(qty001);
sec.Blocks.Add(date001);
FlowDocument fd = new FlowDocument();
PrintDialog pd = new PrintDialog();
fd.PageHeight = pd.PrintableAreaHeight;
fd.PageWidth = pd.PrintableAreaWidth;
fd.PagePadding = new Thickness(50);
fd.ColumnWidth = pd.PrintableAreaWidth;
fd.Blocks.Add(sec);
fd.Blocks.Add(new BlockUIContainer(barCodeImage));
IDocumentPaginatorSource dps = fd;
pd.PrintDocument(dps.DocumentPaginator,"Desciption");
我知道圖像是由進程鎖定,但我怎麼能解開這個形象?
任何幫助,請
感謝
Jazaib
定像無關,與你的標題提出的問題。 – 2013-05-06 19:41:13