Hello everyone and thanks for your help in advance.  I want to create a
vb.net class that uses iTextSharp to create the PDF, then return it to the
calling application, that in turn can either save it to a file or write it
to a browser.  I have tried several ideas to do this without success.  For
example:

Dim ms As MemoryStream = New MemoryStream()
Dim writer As PdfWriter = PdfWriter.GetInstance(document, ms)

Then returning the memory stream to the calling function. Then

        Dim PDFFile As Byte() = ms.ToArray()
        Dim fileStream As FileStream = New
FileStream("J:\Applications\FaxFile\data\PDFtest_byte.pdf", FileMode.Create)
        ' Write the data to the file, byte by byte. 
        For i As Integer = 0 To PDFFile.Length - 1
            fileStream.WriteByte(PDFFile(i))
        Next i

However, this doesn’t seem to work.  From the documentation I have read, the
actual iText objects do not persist well.  I really don’t want to have to
run and maintain duplicate code.  Any help on this would be appreciated.




--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Passing-iText-objects-tp4659673.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to