I have built a routine which takes a byte() array and passes it to iTextSharp for rendering as a PDF. This is working just fine.
However, in my application, users want to be able to select multiple documents and have the program render them as a single, combined PDF.
For the purpose of this discussion, let's say they chose two documents. I form the byte() array containing the data of the first document and then, I increase the size of that byte() array and load the second document's data into one. The result is that I have a single combined byte() array which I now want to render.
However, when the PDF viewer opens (in runtime), it's only showing me the first document (as if there is no more data in the byte() array to render).
My thinking is that perhaps it's picking up the End Of File (EOF) marker and therefore not rendering the data past that point in the byte() array.
Any thoughts on this? Here's my code.
Prior to the For/Next construct, I have a dataset already containing a list of documentId's from a database that works with my EDM package.
A webservice call returns the byte() array for each document in my dataset into mb() and I use mbbnew() to build the combined byte() array for the documents requested by the user.
Just to be clear,
View Complete Post