Hi
I am developing a series of reports where the final pdf is a combination of three RDLC files. I have streamed the it into a byte[] inside of a list. I can retrieve and generate each individual report from stream using this code:
private void CreatePDFReport()
{
int i = 0;
foreach (byte[] bytPart in listByt_ReportParts)
{
FileStream stream = new FileStream(strTExcel + '\\' + i.ToString() + strTempPdf, FileMode.Create);
stream.Write(bytPart, 0, bytPart.Length);
Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf(stream);
pdf1.PageSetup.PageHeight = 29.7f;
pdf1.PageSetup.PageWidth = 21.0f;
stream.Close();
i++;
}
If I try to close the stream after the three reports have been generated, although I get a pdf files with teh total size of the 3 pages combined just the last page is displayed. The company I am working for uses Aspose Total. I used to do this before at my old company.
using this:
Dim pdfOptions As PdfDocumentOptions = New PdfDocumentOptions()
pdfOptions.PdfCompressionLevel = PDFCompressionLevel.Best
Dim byt_PdfReportParts As PDFMerge = New PDFMerge(pdfOptions) ' Declare the PDF Merger class
byt_PdfReportParts.LicenseKey = "??????????????????????" ' Declare the licence key
For Each bytPart As Byte() In listByt_ReportParts
byt_PdfReportParts.AppendPDFStream(New MemoryStream(bytPart)) ' Bind all the report parts created
Next
Do you have anything similar to this on Aspose. I saw some threads where I can combine 2 pdf, but what I need is to generate a pdf of the combined files held at the stream.
Regards, Tony