Keep small table in a page

I have a lot of small tables. I want each small table stay on the same page. So, I did the following:

1. create tOuter = new PdfPTable(1);

2. create tInner and added everything I need for the small table into tInner.

3. add tInner into tOuter (tOuter.addCell(tInner);)

4. added tOuter to my document ( document.add(tOuter);)

I thought since tOuter only has one column and one row, it would altomatically stay on the same page. But, it didn't happen.

What should I do?

Thanks in advance.

How can I add/extract document-level attachments to/from an existing PDF file

I have a PDF file to which I want to add document-level attachments programmatically.
Afterwards, I want to create a tool that allows me to extract these attachments.
Is this possible with iText?

Header vs reorder page for TOC

Hi Bruno,

I need to create a report with a header on each page, except for the 1st page, which
contains the TOC. I was able to reorder pages with the infomation on page 141. But
when I added the header (page 148), the header was added to the TOC page as well. Also, the
ist non-TOC page did not have the header. What should I do about this?

Thanks in advance for any suggestions.

Jiujing Gu

adding content to cell with simulation

I have fixed cell width and height, is there anyway for me to add content in there in simulation mode, then if the content can't fit in, I will decrease the font size and add content again?
On page 104 of the book, it says go() method of internal ColumnText method was invoked. If somehow I can know some content was left out, then I will decrease my font size. Thanks for your help.

Reader Enabled Not Working

I have 2 forms that are reader enabled that I am filling the acroform. The 1st one works without any error, the second gets the pop-up "This document enabled extended features in Adobe Reader ....". I am processing the forms with the same code that sets the PdfStamper to append mode. There is a couple differences that I can find. The one that works, under document properties has the application as Adobe Illustrator CS3 and the producer as Acrobat Distiller 8.1.

Digital Signatures positioning problem

Hello Bruno Lowagie,

i would like to know if it is possible to set the position of Digital Signatures on a bookmark or something else.

My Task:
1. I have to add signaturefield to an existing PDF (That's not a problem. That works fine).
2. I have to add a bookmark near the word "signature". (don't know where to get an example for that)
3. This Signaturefield should get the position above the word "signature". (That's the problem)

What i would like to do:

How to avoid splitting a list (which is an element of another list) between two pages?

I'm following the MovieLists examples from the book's pages 38-39-40 to generate a list in my application but I need to make sure that a List such as directorList, which is part of another List, doesn't get split between two pages. How do I achieve this? Please help!

How to inject RTF content into a Dynamic XFA form.

I need to insert RTF content of a "WinForm - RichTextBox" control programmatically into a Dynamic XFA form that was designed in LiveCycle Designer. The TextField in the designer is set to "Rich Text".

I've tried to inject the RTF content into the XML Stream ([exData contentType="text/html"]...RTF Content...[/exData]) w/o success.

Would anyone have a solution for this issue and possibly provide a sample snippet or tip of how to accomplish this?

Thank you.

Spiro

Dynamically sized Headers and Footers

I am writing a simple library to generate basic reports as part of a project converting an application written in another language using a different reporting system. The old app report library drove MSWord via COM for report output, and allowed creation of headers and footers of varying sizes (ie: number of lines). The page body content was automatically adjusted down or up as necessary by MSWord based on the size of the header, effectively adjusting the page's top/bottom "margins" to accommodate the header/footer if they would intrude on the page's body content.

Difference between PdfCopy and PdfSmartCopy

I just changed my code over to use PdfConcatenate instead of PdfSmartCopy and it's really tightened things up, great improvement! Can you tell me what the 'redundant content' smart parameter looks for inside the files?

Syndicate content