I am trying to run my pdf document (0,0), however it seems that the document object has a top edge by default, which I cannot set to 0. Is there a way to do this?
My code is as follows
using (MemoryStream memoria = new MemoryStream()) { Document pdf = new Document(new Rectangle(288, 144)); try { PdfWriter writer = PdfWriter.GetInstance(pdf, memoria); pdf.Open(); pdf.SetMargins(0, 0, 0, 0); PdfPTable tPrincipal = new PdfPTable(2); tPrincipal .WidthPercentage = 100; tPrincipal .DefaultCell.Border = 0; tPrincipal .TotalWidth = 288f; tPrincipal .LockedWidth = true;
....
I just can't set the top margin to 0. It just doesn't care about my setup (0,0,0,0) and leaves the top edge (about 50 feet).
margin itextsharp
Lilian
source share