I was able to get the rotation with the following code:

Dim widgetDict As PdfDictionary = Nothing
Dim mkDict As PdfDictionary = Nothing
Dim rNum As PdfNumber = Nothing
widgetDict = afi.widgets(0)
If Not widgetDict Is Nothing Then
        mkDict = widgetDict.GetAsDict(PdfName.MK)
        If Not mkDict Is Nothing Then
                rNum = mkDict.GetAsNumber(PdfName.R)
                If Not rNum Is Nothing Then
                        return = rNum.DoubleValue
                End If
        End If
End If

But I am not checking that bit you referred to.  Do you anticipate any
problems with the way it is here?



Bruno Lowagie (iText) wrote:
> 
> seedy wrote:
>> I want to find the rotation angle of a pre-existing TextField on the pdf. 
>> So
>> if I have an AcroField.Item like so:
>> 
>> Dim af as text.pdf.AcroFields = stamper.AcroFields
>> Dim afi as text.pdf.AcroFields.Item = af.GetFieldItem('fieldName')
>> 
>> What steps are next to get the rotation value for 'afi'?
> 
> afi.GetMerged(0); (or item.Merged(0); I don't know the exact syntax
> in iTextSharp). The result is a dictionary.
> 
> "In this dictionary, there's a key /F, F stands for Flags:
> a set of flags specifying various characteristics of the
> annotation (see 12.5.3, "Annotation Flags"). Default value: 0."
> 
> The value is a number (used as a bitset). The fifth bit is
> the NoRotate bit: "if set, do not rotate the annotation's
> appearance to match the rotation of the page. The upper-left corner
> of the annotation rectangle shall remain in a fixed location on the
> page, regardless of the page rotation. See further discussion following
> this Table."
> 
> (The parts between double quotes are quoted form ISO-32000-1.)
> br,
> Bruno
> 
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> 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
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TextField-rotation-tp23888144p23889914.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to