Hello,
I have tested your code on VS2005 (Net 2.0) and I have no problem. Both landscape and portrait work well.
However I have some notes about your code.
MemoryStream.GetBuffer gives you the current buffer and not the real content of the stream. Tipically at the end of the buffer there are many 0-bytes.
If you need the memorystrem content, you can use ToArray().
Your code:
Response.OutputStream.Write(m.GetBuffer(), 0, m.GetBuffer().Length);
Replace with:
Response.OutputStream.Write(m.ToArray(), 0, (int)m.Length);
Fabrizio
On 11/3/06, Pete Gordon - Users First Lists <
[EMAIL PROTECTED]> wrote:
I spent all day working on this issue and narrowing it down. It has
to do with the use of PdfPTable with four cells in a Web
Application. It is unable to be duplicated with a command line
application. It generated the PDF file on the command line.
Here is the simple aspx code behind that shows the problem. If the
document is not setup in Landscape (rotate) or if it has less than
four Cells in the PdfPTable or if the Paragraph is less than 15
characters it generates fine, otherwise the file is damaged. Whew!
That was a lot to type... I found it when I started putting in a
Paragraph that had a full description (more than 15 characters).
Can someone please verify for me that they are seeing the same
behavior in ASP.NET with the code below? And, maybe someone will
have an idea of how I can address this. I am trying to create
absolute positioned tables for label printing (4 labels per page).
I am new to iTextSharp, so please excuse me if this is a simple
mistake on my part or has been addressed already.
------------------------------------------------------------------------- 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
