Re: [iText-questions] bytearrayoutputstream to rtf

2009-08-04 Thread Stephan Trautmann
1T3XT info wrote: > But you only generated the bytes of a PDF file. You need a PDF to RTF > convertor to server RTF. Due to the nature of PDF, it will be hard to > find software that allows you to do that. > That's... the reason why you didn't get an answer earlier. Usually > people don't ac

Re: [iText-questions] bytearrayoutputstream to rtf

2009-08-04 Thread 1T3XT info
Stephan Trautmann wrote: > Hello, > > I have created a pdf and saved it temporaily to memory into a > bytearrayoutputstream. This means that you have bytes like: byte[] = { '%', 'P', 'D', 'F', '-', '1', '.', '4',... } > Now That byte stream is a PDF file; it contains PDF syntax. > I woul

[iText-questions] bytearrayoutputstream to rtf

2009-08-04 Thread Stephan Trautmann
Hello, I have created a pdf and saved it temporaily to memory into a bytearrayoutputstream. Now I would to like to output this stream into a rtf file Maybe you ask yourself now, "why the hell doesn't he directly output into a document having a rtfwriter instance"... well.. I have cre

Re: [iText-questions] ByteArrayOutputStream

2007-01-01 Thread Daniel Essin
Thanks for the elucidation. I'm really very excited about the prospects for what I will be able to do with iText. Keep up the great work, Dan Bruno Lowagie wrote: > Daniel Essin wrote: >> That's a very helpful summary. As far as not mentioning it, that's fine >> as far as the text is concerned,

Re: [iText-questions] ByteArrayOutputStream

2006-12-31 Thread Bruno Lowagie
Daniel Essin wrote: > That's a very helpful summary. As far as not mentioning it, that's fine > as far as the text is concerned, but it probably should be included on > the class diagram of the PdfWriter since that's highly technical and > should really correspond to the visible properties and m

Re: [iText-questions] ByteArrayOutputStream

2006-12-30 Thread Daniel Essin
That's a very helpful summary. As far as not mentioning it, that's fine as far as the text is concerned, but it probably should be included on the class diagram of the PdfWriter since that's highly technical and should really correspond to the visible properties and methods of the classes. Othe

Re: [iText-questions] ByteArrayOutputStream

2006-12-30 Thread Bruno Lowagie
Daniel Essin wrote: > The only part that was an iText issues is that in the .NET version of > the PdfWriter, the stream is closed when the document is closed unless > you obtain a reference to the PdfWriter and set the CloseStream property > to false. This property (I think) does not exist in th

Re: [iText-questions] ByteArrayOutputStream

2006-12-30 Thread Bruno Lowagie
robert engels wrote: > I don't think your problem has anything to do with itext, Seems to me the PDF is generated correctly in memory, but as there are no bytes sent to the browser, the original poster has probably forgotten to write the bytes to the output stream. > i think if you created a simp

Re: [iText-questions] ByteArrayOutputStream

2006-12-30 Thread Daniel Essin
I worked on this for some time earlier today (with a lot of help from others) and have gotten all of the issues resolved. I now understand how to make it work reliably with HttpResponse stream, FileStreams and MemoryStreams. The only part that was an iText issues is that in the .NET version of

Re: [iText-questions] ByteArrayOutputStream

2006-12-30 Thread robert engels
I don't think your problem has anything to do with itext, It is a misunderstanding on how to use a Response stream. i think if you created a simple memory stream of a text file, you would have the same problem. You need to ask these questions on a M$ .Net web programming site. On Dec 30, 20

Re: [iText-questions] ByteArrayOutputStream

2006-12-30 Thread Daniel Essin
There was an example in the iText in Action book that demonstrated doing it this way. I am just trying to get a full understanding of how the methods work before I start real coding. I understand the potential inefficiency of feeding this through a memory stream and I doubt that I would actuall

Re: [iText-questions] ByteArrayOutputStream

2006-12-29 Thread robert engels
You are best to supply PdfWriter with the Response.OutputStream anyway, otherwise you need to buffer the entire PDF in memory. Why do you want to do this? On Dec 29, 2006, at 5:40 PM, Daniel Essin wrote: > It's not different English, it's just a snapshot into the evolving > state > of my con

Re: [iText-questions] ByteArrayOutputStream

2006-12-29 Thread Daniel Essin
It's not different English, it's just a snapshot into the evolving state of my confusion. My original post was confused because I was confused. I was reading a hex dump of the stream buffer and I did 2 things that were both wrong: - I misinterpreted the first character in the buffer as a 7 inste

Re: [iText-questions] ByteArrayOutputStream

2006-12-29 Thread robert engels
We must be using different english... On Dec 29, 2006, at 5:14 PM, Daniel Essin wrote: OK let me start over again. I was reading the dump incorrectly and the first byte is a % - Take Surveys. Earn Cash. Influence the Futu

Re: [iText-questions] ByteArrayOutputStream

2006-12-29 Thread Daniel Essin
gt; I think I figured out how to set the content length: >>>>> resp.AppendHeader("Content-Length", baos.Length.ToString()); >>>>> >>>>> Acrobat still complains that the data it is receiving does not >>>>> begin >>>>&g

Re: [iText-questions] ByteArrayOutputStream

2006-12-29 Thread robert engels
;> >>>> Acrobat still complains that the data it is receiving does not >>>> begin >>>> with %PDF- >>>> >>>> The dump of the byte array still says it begins >>>> with 7PDF- >>>> >>>> Help, please, >>

Re: [iText-questions] ByteArrayOutputStream

2006-12-29 Thread Daniel Essin
s.Length.ToString()); >>> >>> Acrobat still complains that the data it is receiving does not begin >>> with %PDF- >>> >>> The dump of the byte array still says it begins >>> with 7PDF- >>> >>> Help, please, >>> Dan >&g

Re: [iText-questions] ByteArrayOutputStream

2006-12-28 Thread robert engels
;> Paulo Soares wrote: >>>> Don't forget to set the content length. >>>> >>>> Paulo >>>> >>>> - Original Message - >>>> From: "Daniel Essin" <[EMAIL PROTECTED]> >>>> To: >>>&g

Re: [iText-questions] ByteArrayOutputStream

2006-12-28 Thread Daniel Essin
Help, please, > Dan > >> Paulo Soares wrote: >>> Don't forget to set the content length. >>> >>> Paulo >>> >>> - Original Message - >>> From: "Daniel Essin" <[EMAIL PROTECTED]> >>> To: >>> Sent:

Re: [iText-questions] ByteArrayOutputStream

2006-12-28 Thread Daniel Essin
y still says it begins with 7PDF- Help, please, Dan > Paulo Soares wrote: >> Don't forget to set the content length. >> >> Paulo >> >> - Original Message - >> From: "Daniel Essin" <[EMAIL PROTECTED]> >> To: >> Sent: T

Re: [iText-questions] ByteArrayOutputStream

2006-12-28 Thread Daniel Essin
Paulo Soares wrote: > Don't forget to set the content length. > > Paulo > > - Original Message - > From: "Daniel Essin" <[EMAIL PROTECTED]> > To: > Sent: Thursday, December 28, 2006 10:31 PM > Subject: [iText-questions] ByteArrayOutpu

Re: [iText-questions] ByteArrayOutputStream

2006-12-28 Thread Paulo Soares
Don't forget to set the content length. Paulo - Original Message - From: "Daniel Essin" <[EMAIL PROTECTED]> To: Sent: Thursday, December 28, 2006 10:31 PM Subject: [iText-questions] ByteArrayOutputStream > I'm trying to use iTextSharp to work through

[iText-questions] ByteArrayOutputStream

2006-12-28 Thread Daniel Essin
I'm trying to use iTextSharp to work through the examples in Chapter 17 of the book. The first example worked perfectly. The second example of writing to the response object through a ByteArrayOutputStream fails. It fails because Acrobat complains that the stream should begin %PDF-. By examining