> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Sander Bisschops
> Sent: Thursday, August 28, 2008 1:20 PM
> To: [email protected]
> Subject: [iText-questions] Rotate Action?
>
> Hi guys,
>
>
>
> This is my first post to this mailinglist, please be gentle ;)
>
>
>
> I'm working with iTextSharp to generate PDF files. I'm trying
> to add links to them, like URLs on websites. I've found that
> there are 2 ways: 1) just throw in http://www.google.com/ and
> Adobe Reader at least will make it clickable; 2) Use an
> Action, which makes a rectangular area clickable and assign
> any URL to it. It takes a bit of magic to get the rectangle
> over the right word, but it works.
>
An Anchor does that work for you if the text is not rotated.
>
>
> Now the problem shows up when text is rotated. It seems
> impossible to rotate an Action, why? I've tried a few things,
> for example:
>
> - use ConcatCTM (I'm using the PdfContentByte to write text
> and actions): the text is rotated but the action isn't
>
> - throw the Action on a template, then rotate the template
> (I've put a test rectangle on, which gets rotated just fine,
> but the action remains unrotated)
>
> - put the Action on an Annotation and try to rotate that
> (again, ConcatCTM), no luck here either.
>
Annotation are document content not page content, ConcatCTM won't work.
Annotation rotation is tricky because you have to know where all the
tranformations are and do the same on the annotation itself. The simplest why
is perhaps use a generic tag event in the text in question and keep track of
the transformations. When the tag event is called it provides the unrotated
rectangle of the text, transform it and create the annotation. This probably
needs an example.
Paulo
>
>
> Am I doing something wrong? I can't believe it's impossible
> to have a rotated link to a webpage, but then I can't really
> think of a proper use anyway. If it's impossible, that's ok,
> this is for a dynamic PDF generator that may one day have to
> generate rotated links, but not yet.
>
>
>
> Cheers,
>
> Sander
>
>
>
> PS: I searched the archives and found nothing close to this...
>
>
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php