itextsharp - Inserting a table into multiple PDF pages with columnText -
I am trying to insert a table in a PDF template. It succeeds when the table fits on the page. However, if it is too big, then we lose data, basically it just wants to paste a next page of the pen text that looks like page # 5.
This is my current code, it is creating a blank white page in front of page # 4 and writing the remaining column text data where it was already pasted for the first time.
PDF imported page template page = stammer GetImportedPage (pdfReader, 5); Intra pajamam = 5; While (true) {ct.SetSimpleColumn (-75, 50, pc. A4, Hight + 25, Pagesy's A 4.Width - 200); If (Column text.Hesore text (whistle go ()) break; PageNum ++; Stamper.InsertPage (page new, new rectangle (792f, 612f)); Stamper.GetOverContent (Page News) .AddTemplate (Template Page, 0, 0); }
I created a small code sample whose name you used to meet Code can The reason for this is that all the content has been added to the same page. You forgot this line:
ct.setCanvas (stamper.getOverContent (pageNum));
Note that my example is written in Java, but I'm sure how you would optimize it for C #. If you post your fixed in a comment, then I will update my answer, by adding the C # version of the solution.
Comments
Post a Comment