Birthe Berland wrote:

Thanks.

please keep on the mailing list.

Just another question. On this receipt I need to position elements at fixed positions starting from the top. Eg. the logo and a header. How can I do that when I don't know the origin of the page.

So you generate the very long page in memory,
you add a generic chunk, do document.newPage() and close the document.
The generic chunk is able to tell you a y-coordinate
from which you can calculate the height.

Now you are going to create a new document with this height.
Add all kinds of watermarks, logo's, etc...
Import the first page of the document you generated in memory.
Finally add this page on top of the watermarks, logo's, etc...

This is just a suggestion.
Maybe there are much easier ways to do it, depending on your
projects specifications. For instance: you could generate your
receipt on small pages with a height X, than count the number
of pages and multiply it with X to create a new (long) document.
Read the different pages from the original document and add
them on the new document at the correct position.


Birthe Berland

On 27/9-2005, at 17:34, Bruno Lowagie wrote:

Birthe Berland wrote:

How do I define a page with a fixed width (8cm) and an unknown height. I am going to print out a receipt with an unknown size.



Define a document with a very long height,
create the document in memory
and copy the page of the document in
memory to a new document that has
the correct height.
br,
Bruno






-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to