We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert existing PDF to new Aspose.PDF.Generator.PDF object

We use the Aspose PDF Generator for .NET in an MVC Application. I have a Aspose.PDF.GENERATOR.PDF object which I save to the output stream:


      //Save temporary file
pdf.Save(this.Response.OutputStream);
  Response.ContentType = <span style="color:#a31515;">"application/pdf"</span>;
  Response.AppendHeader(<span style="color:#a31515;">"Content-Disposition"</span>, <span style="color:#a31515;">"inline; filename=file.pdf"</span>);

  <span style="color:blue;">return</span> <span style="color:blue;">new</span> <span style="color:#2b91af;">EmptyResult</span>();</pre><pre style="font-family: Consolas; font-size: 13px; background: white;"><br></pre><div>Now we have to insert an uploaded PDF into our PDF which we create per code? Is this possible?<div><br></div><div>Best regards</div></div></div>

Hi Lion,


Thanks for your inquiry. As per my understanding you want to merge a PDF document into other. You can pass Aspose.Pdf.Generator.Pdf (old generator) object to Aspose.Pdf.Document(new generator) and merge PDF document as suggested in this documentation.

Moreover, we will recommend to use new generator to create PDF document as well. It is more efficent and improved. You can use it for both creating a new PDF from scratch or manipulating existing PDF document.

Please feel free to contact us for any further assistance.

Best Regards,