LarryM (2) [Avatar] Offline
#1
I want to create the PDF, convert it to a byte array, and store it in a SQL table without saving it on disk, reopeing it and converting it to bytes. I'm doing this in C# with iTextSharp. I'm new to all this. Is this possible?
blowagie (284) [Avatar] Offline
#2
Re: iTextSharp PDF to Byte w/o file creation on disk
Being new at iText isn't an excuse as this question is a general C# question.
As you probably read in the book iText can write to any outputstream.
In Java one would write to a ByteArrayOutputStream instead of to a FileOutputStream to achieve what you need.
If you're asking me for the corresponding class in C#, you're on the wrong forum.
I've never written one line of C# code. You should post this question on a C# forum, asking for an OutputStream that writes stuff to a byte array.
LarryM (2) [Avatar] Offline
#3
Re: iTextSharp PDF to Byte w/o file creation on disk
I'm new to C# too, but that was probably obvious. Thanks for the response. I'll look for the C# solution.