Well, I don't know the actual page setup since I receive the width and
height parameters. And even if I could determine which page setup is used
(A-series, B-series) the user can still choose a custom file format and
specify an orientation. What do I do then?

if (gc.getPageFormat().getOrientation() ==
RGPageFormat.ORIENTATION_LANDSCAPE)

    document = new Document( new
com.lowagie.text.Rectangle(formatHeight,formatWidth));

else

    document = new Document(new
com.lowagie.text.Rectangle(formatWidth,formatHeight));


Many thanks,
Ligius


> Use this to create the document instance:
>
>       Document document = new Document(PageSize.A4.rotate());
>
> You can change 'A4' to another page format specified in PageSize.
> Ciao
> Mauro
>




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to