Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET PDF VB.NET image , +
Can you guys help me with dynamically creating pdf docs with itextsharp, while at it, inside the document, create Headers and Footers using images with a loop or something that can help
and also add a side panel/image on the pdf that appears on all pages, this pages are being dynamically generated by either a table or a gridview, I have used a table because I can easily control it unlike the gridview that just prints everything on the pages
My pages created could be from 1 to 8 or 1 to 9 or 1 to 3, the number of pages are unknown, so when I run this for loop below in vb code...the document falls into pieces, You find page repeating itself twice rather than once
For i As Integer = 2 To Len(i)
pdfDoc.Add(Headerpdf) ' this is an image that has to appear on the top of every new page, starting from the second page until the Nth page.

pdfDoc.Add(sidepdf)'' this is an image that has to be printed on the page side of the document, on the left handside of the text, near the text, not under or above it
pdfDoc.Add(table)his is the actuall body, in a table which gets printed to the pdf...most simplest to do that I have so far
pdfDoc.Add(Footerpdf)'this is the footer image of my pdf page, starting from the second page until where the table body page ends, then the following next page(last page) has it's own images
pdfDoc.NewPage() 'this new Page, should I keep it in this loop or remove it?
Posted 28-Sep-12 0:02am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,535
1 OriginalGriff 8,295
2 Peter Leow 4,839
3 Kornfeld Eliyahu Peter 3,210
4 Maciej Los 2,301

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 29 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100