Click here to Skip to main content
Rate this: bad
good
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?
Next
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 OriginalGriff 295
1 DamithSL 265
2 CPallini 235
3 Maciej Los 190
4 Sergey Alexandrovich Kryukov 174
0 OriginalGriff 5,415
1 DamithSL 4,422
2 Maciej Los 3,820
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,911


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 29 Sep 2012
Copyright © CodeProject, 1999-2014
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