Is it possible to merged pdf file without saving it to disk?
I have a generated pdf (via itextsharp) and a physical pdf file. These two should show to the browser as merged.
What I currently have is, (a pseudo code)
public ActionResult Index()
{
// Generate dyanamic pdf first
var pdf = GeneratePdf();
// Then save it to disk for retrieval later
SaveToDisc(pdf);
// Retrieve the static pdf
var staticPdf = GetStaticPdf();
// Retrieve the generated pdf that was made earlier
var generatedPdf = GetGeneratedPdf("someGeneratedFile.pdf");
// This creates the merged pdf
MergePdf(new List<string> { generatedPdf, staticPdf }, "mergedPdf.pdf");
// Now retrieve the merged pdf and show it to the browser
var mergedPdf = GetMergedPdf("mergedPdf.pdf");
return new FileStreamResult(mergedFile, "application/pdf");
}
This works, but I was just wondering if, would it be possible to just merged the pdf and show it to the browser without saving anything on the disc?
Any help would be much appreciated. Thanks