Lee Marshall wrote:
> Dim stamper As iTextSharp.text.pdf.PdfStamper = Nothing
> Dim underContent As iTextSharp.text.pdf.PdfContentByte = Nothing
> reader = New iTextSharp.text.pdf.PdfReader(sourceFile)
> rect = reader.GetPageSizeWithRotation(1)
> stamper = New iTextSharp.text.pdf.PdfStamper(reader, New
> System.IO.FileStream(outputFile, IO.FileMode.Create))
>
> underContent = stamper.GetOverContent(1)

Here you either use writeSelectedRows,
or you wrap the table in a ColumnText object.

> stamper.Close()
> reader.Close()

----------------------------------------------------------------------------
-
Ok, you mentioned that I need to use writeSelectedRows.   Do you have a
working example/tutorial?

I tried the following but it doesn't work or does work and I need to figure
out how to write as white font.
'[BEGIN CODE]
Dim stamper As iTextSharp.text.pdf.PdfStamper = Nothing
Dim underContent As iTextSharp.text.pdf.PdfContentByte = Nothing
reader = New iTextSharp.text.pdf.PdfReader(sourceFile)
rect = reader.GetPageSizeWithRotation(1)
stamper = New iTextSharp.text.pdf.PdfStamper(reader, New
System.IO.FileStream(outputFile, IO.FileMode.Create))

underContent = stamper.GetOverContent(1)

'---- START NEW CODE ----
'create a 2 column table
Dim nTbl As PdfPTable = New PdfPTable(2)
'create column sizes
Dim rows As Single() = {50.0F, 250.0F}
'set row width
nTbl.SetTotalWidth(rows)

nTbl.AddCell("Cell1")
nTbl.AddCell("Cell2")
nTbl.WriteSelectedRows(0, 50, 0, 0, underContent)
'---- END NEW CODE ----

stamper.Close()
reader.Close()
'[END CODE]

Thanks
Lee



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to