Works for me:
Document doc = new Document();
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream("c:\\test.pdf",
FileMode.Create));
doc.Open();
PdfPTable t = new PdfPTable(1);
PdfPCell c = new PdfPCell(new Phrase("Hello"));
c.Rotation = 90;
t.AddCell(c);
doc.Add(t);
doc.Close();
Paulo
________________________________
From: R. Garstenveld [mailto:[email protected]]
Sent: Monday, May 24, 2010 11:37 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] help text rotation in a cell
Paulo,
This is the code. (i have dll 5.0.2)
Dim cell As New PdfPCell
cell = New PdfPCell(New Phrase("test", New iTextSharp.text.Font(Font.COURIER,
letterGrootte, Font.NORMAL)))
cell.Rotation = 90
tabeltwee.AddCell(cell)
tabelTwee is a PfdPTable
i can see the table but the text "test" is not shown. If i do cell.rotation =
180, then the text is shown upside down(thats logical! thats ok)
but cell.rotation = 90 , the text "test" is just disappeared.
??
Thanks in advance...
RObbin
From: Paulo Soares<mailto:[email protected]>
Sent: Monday, May 24, 2010 12:25 PM
To: Post all your questions about iText
here<mailto:[email protected]>
Subject: Re: [iText-questions] help text rotation in a cell
I guess I'll have to spell it. I've no idea what you are doing. Post some code
so that I can reproduce the problem (if any). Use version 5.0.2, I can't test
anything older.
Paulo
________________________________
From: R. Garstenveld [mailto:[email protected]]
Sent: Monday, May 24, 2010 11:20 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] help text rotation in a cell
Yes..? You know the answer?
It is so strange.. trying everything...
From: Paulo Soares<mailto:[email protected]>
Sent: Monday, May 24, 2010 12:12 PM
To: Post all your questions about iText
here<mailto:[email protected]>
Subject: Re: [iText-questions] help text rotation in a cell
Do you want me to guess?
Paulo
________________________________
From: R. Garstenveld [mailto:[email protected]]
Sent: Monday, May 24, 2010 11:03 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] help text rotation in a cell
Thank you, i now use the PdfPCell with cell.rotation = 180
It works fine!
But when i do:
cell.rotation = 90
then the text in the cell disappeares!? How is this possible? what am i doing
wrong? Any solution?
Robbin
From: Paulo Soares<mailto:[email protected]>
Sent: Monday, May 24, 2010 10:50 AM
To: Post all your questions about iText
here<mailto:[email protected]>
Subject: Re: [iText-questions] help text rotation in a cell
It only works with PdfPCell. By the way, Cell was removed in version 5.
Paulo
________________________________
From: R. Garstenveld [mailto:[email protected]]
Sent: Monday, May 24, 2010 9:38 AM
To:
[email protected]<mailto:[email protected]>
Subject: [iText-questions] help text rotation in a cell
iTextSharp,
I tried all of the iTextsharp dll versions. I just cannot get a text in a cell
of a table rotated.
Dim cell As Cell = New Cell
cell = New Cell(New Phrase("This is a test", New
iTextSharp.text.Font(Font.COURIER, 9, Font.NORMAL)))
i tried:
cell.Rotate() 'nothing happends
andalso:
cell.Rotation = 90 'rotation = readOnly, so an error accured
Please can anyone help me?
________________________________
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.
________________________________
------------------------------------------------------------------------------
________________________________
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
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/
test.pdf
Description: test.pdf
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
