I am doing the export of 2 PDF. I comment more detailed to generate those 2 pdf I want to be downloaded by pressing an EYE button (the PDFs are different)
but the moment you run and it ends in response.end () it stops and you no longer download the next PDF.
I would like the two PDFs to be downloaded please if you could help me
The following is the following:
**1 pdf**
void primerpdf()
{
Document pdfDoc = new Document(PageSize.A4, 50f, 50f, 50f, 50f);
iTextSharp.text.Document oDoc = new iTextSharp.text.Document(iTextSharp.text.PageSize.LETTER);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
PdfWriter wri = PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
var subtitulo = new Paragraph("COMPROMISO DE BUEN USO", verdanaBold);
subtitulo.Alignment = 1;
subtitulo.Font.Size = 9;
pdfDoc.Add(subtitulo);
pdfDoc.Close();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=ACTA DE ENTREGA DE EQUIPO CELULAR_" + _Nombres + ".pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Write(pdfDoc);
Response.End();
}
void segundopdf()
{
Document pdfDoc = new Document(PageSize.A4, 50f, 50f, 50f, 50f);
iTextSharp.text.Document oDoc = new iTextSharp.text.Document(iTextSharp.text.PageSize.LETTER);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
PdfWriter wri = PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
var subtitulo = new Paragraph("hola", verdanaBold);
subtitulo.Alignment = 1;
subtitulo.Font.Size = 9;
pdfDoc.Add(subtitulo);
pdfDoc.Close();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=ACTA DE ENTREGA DE EQUIPO CELULAR_" + _Nombres + ".pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Write(pdfDoc);
Response.End();
}
protected void BtnGrabarM_Click(object sender, EventArgs e)
{
primerpdf();
segundopdf();
}