Daniel Cane wrote:
> The first page is somewhat more structured than the 
> subsequent pages as it has the patient history, etc. The secondary pages will 
> have any overflow from the first page and include images, etc. I would like 
> all 
> of the secondary pages to have a header, footer, and page number. 
> 
> 
> My first approach was attempting to create the page from "scratch" using 
> chunks, paragraphs, etc. This seems to give me a ton of control, but I find 
> myself tinkering (a ton) to get the layout to work. 

Correct.
Using the chunks and paragraphs are ideal to create the flow
of content (from your database), but not for the first page
where you probably have fixed items such as "patient name",
"birth date",...

> My second approach was to use the PdfStamper with form fields I drew in 
> Acrobat. The merge of the structured fields worked great, but I'm stuck with 
> the "unstructured" portion of the output getting cut off (since my template 
> is 
> only the first page). 

I would create a two page PDF with Acrobat.
I would use the first page of this template for the first page
of the new document, and the second page for all subsequent pages.
I would use fields to define small rectangles for the fixed items,
and a large rectangle for the unstructured content.

> Question - how can I / can I have a page 1 template, and then a page 2+ 

I would work with ColumnText.

For the first page, I would add the first page of the template
without the fields as the background of my new document.
I would retrieve the positions of the fixed items, and put them
on the page using ColumnText.

Then I would create a ColumnText object for the unstructured content;
I would add the unstructured content using paragraphs, tables,...
I would also call go() on a regular basis. Whenever a new page is
needed, I would add a new page with the second page of the template
as background.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to