Great answer, thank a lot for your help! I didn't notice that overload
On Saturday, March 31, 2012, 1T3XT BVBA wrote:
> On 31/03/2012 16:13, Christoph Schramm wrote:
> > It works well, but it ignores the rotation.
>
> You're mixing "let iText control things" with "let me control things"!
>
> If you declare a rotation, you say: "let iText control things". This
> means you intend to add the image to a Document with the Add method.
> However, if you add an Image to a PdfTemplate using addImage and you
> define a transformation matrix (maskw, 0, 0, maskh, imageX, imageY), you
> say "let me control things". The two zeros in your (maskw, 0, 0, maskh,
> imageX, imageY) tell me you're not rotating the image.
>
> > I already tried to put the original image in another template, rotate
> > that, get an image instance from that and at his image instance to my
> > PdfTemplate t. But that doesn't work neither.
>
> Either you do:
> img.RotationDegrees = (float)userbild.ImageFrame.rotation;
> And you add the image straight to a Document object.
>
> Or you want to add the image to a PdfTemplate, in which case you don't
> define RotationDegrees, but you use:
> t.AddImage(img, maskw * cosine(angle), maskh * sine(angle), maskw *
> -sine(angle), maskh * cosine(angle), imageX, imageY);
> I don't know the exact notation of the methods for sine and cosine in
> C#, but I hope you get the idea.
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> iText-questions mailing list
> [email protected] <javascript:;>
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php