foreach (PdfDictionary dict in item.merged)
{
foreach(PdfName name in dict.Keys)
{
if (name.ToString() == "/AP")
{
PdfDictionary fontDict = (PdfDictionary)dict.Get(name);
foreach (PdfName name2 in fontDict.Keys)
{
if (fontDict.Get(name2).IsIndirect())
{
Console.WriteLine("indirect found");
PRIndirectReference obj = (PRIndirectReference)fontDict.Get(name2);
PRStream stream = (PRStream) PdfReader.GetPdfObject(obj);
Console.WriteLine(stream.GetType().Name);
foreach (PdfName o in stream.Keys)
{
Console.WriteLine("{0} {1}", o.ToString(), stream.Get(o));
}
PRTokeniser token = new PRTokeniser(stream.GetBytes
());
while (token.NextToken())
{
if (token.TokenType == PRTokeniser.TK_STRING) Console.WriteLine(token.ToString());
}
Console.WriteLine(obj.Type);
}
}
}
}
Abhishek Srivastava wrote:
> 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?
The problem you had is that the template is rotated outside the page.
I don't have the time to look it up right now, but it is just a matter of
applying some high school algebra. You can find the formulas here:
http://itextdocs.lowagie.com/tutorial/directcontent/coordinates/index.html#transform
br,
Bruno
-------------------------------------------------------------------------
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
------------------------------------------------------------------------- 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
