Hi All, I am stuck with adding a Header and Footer to an existing PDF using iText. Any clues are appreciated. I have already checked the iText Documen. See More On StackoverflowTina Tibrewal wrote:Adding Multiple line header and footer doesnt seem possible with PdfStamper. That's not correct. There are different ways to add a multiple line header. Please read chapter 3 of the book to find out how to use ColumnText to add multiple lines at absolute positions. You can also use a PdfPTable. As a matter of fact, there's an example in the chapter that is available for free on the book page at Manning that uses a PdfPTable for the header; see listing 6.14. As you probably know a PdfPCell can consist of multiple lines. Thanks Bruno. I got it working. But now the problem I am facing is - It is not writing the header properly. Though I do a getOverContent and getUnderContent and then add tables but somehow the header is not being written. Any suggestions there? Tina Tibrewal wrote:I got it working. Download how to burn dmg files. The book sample works. Tina Tibrewal wrote:But now the problem I am facing is - It is not writing the header properly. You adapted the book sample, and you don't see the header, but I'm not sitting at your desk, I can't see what's wrong. I can only tell that 1000pt seems like a very large table to me (does it fit on the page, or is it written outside the visible area of the page?) and that I really don't like these lines: Tina Tibrewal wrote:Document document = underContent.getPdfDocument(); Document overDocument = overContent.getPdfDocument(); You didn't get these from one of the book examples, did you? ![]() > -----Original Message----- > From: > [mailto:] On > Behalf Of Sam Collett > Sent: Monday, October 17, 2005 4:47 PM > To: > Subject: [itextsharp-questions] Adding images to an existing PDF > > How do you add images to an existing PDF document? Using > Acrobat 5 to edit the PDF, and iTextSharp to manipulate it > via ASP.NET C#. > > For instance, I may have a page that displays a logo in the > top right hand corner. Give More FeedbackEach page could have its own logo (the > link to the logo which will be embedded will be stored in a > database). The logos size is undetermined. > > Is it possible to do this by creating a field, positioning it > where you want the logo and then replacing it (making sure > the image is right aligned)? > > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. _______________________________________________ itextsharp-questions mailing list. > -----Original Message----- > From: Sam Collett [mailto:] > Sent: Tuesday, October 18, 2005 1:04 PM > To: Paulo Soares; > Subject: Re: [itextsharp-questions] Adding images to an existing PDF > > What if the image size is not the same as the field size? Can > you have a field that is very small, that you then expand > (not off the page, but towards the centre) to fit the image?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |