Thanks Bruno,
 
The image approach works for me.
 
However I want to compare it to the addTemplate apporach.
 
if a co-ordinate is X1, Y1 in portait, then it becomes Y1, PageSize.A4.Width - X1 when the page becomes landscape.
 
Given the above, what transformation matrix should be applied? so that the template is added correctly?
 
regards,
Abhishek.

On 8/7/06, Abhishek Srivastava <[EMAIL PROTECTED]> wrote:
Hello Bruno,
 
I tried the following to rotate the template by 90 degrees.

writer.DirectContent.addTemplate(_page, 0, 1, -1, 0, PageSize.A4.height(), 0);

Now I get an inverted Imported page. (upside down).

If I try any other permutation combinarion I get a blank pdf. (for example:

  • _page, 0, 1, -1, 0, -1 * PageSize.A4.height(), 0).
  • _page, 0, 1, -1, 0, PageSize.A4.width(), PageSize.A4.height())
  • _page, 0, 1, -1, 0, PageSize.A4.height(), PageSize.A4.width())
 
Could you please give me what parameters should I use for a, b, c, d, e, f so that my vertical template rotates 90 degrees.
 
I don't want any scaling. and my source document is always of the same size (A4, landscape).
 
reagards,
Abhishek.

On 8/7/06, bruno <[EMAIL PROTECTED] > wrote:
Abhishek Srivastava wrote:

> > There are different ways to solve this
>
> Which will be the most efficient?

"One answer solves all" doesn't apply here.
First I thought of answering that the addTemplate
with the transformation coordinates would be the
best way to go, but then you need to do some
extra calculations. That's no problem if the original
PDF always has the same dimensions, but if you
have to support any template PDF (with any possible
page format and orientation), it could be more
interesting to use the Image approach (maintenance
will be easier)
br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to