private static void GenerarPDF(string IdPV, string CorrelativoVta, string Cliente, string DNICliente, decimal Importe, decimal IGV, decimal ImporteExonerado, decimal ImporteTotal, int IdUsuario, string CodigoHash, string Serie, string SimCard, string NombreArchivo, string TipoDoc, string Telefono ) { DataTable dt = new DataTable(); using (SqlConnection objconex = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLDATALineaNegocio22"].Conne ctionString)) { objconex.Open(); using (SqlCommand cmd = new SqlCommand("PA_ObtenerDatosVenta", objconex)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("IdPV", SqlDbType.VarChar).Value = IdPV; cmd.Parameters.Add("IdUsuario", SqlDbType.Int).Value = IdUsuario; cmd.Parameters.Add("ImporteTotal", SqlDbType.Decimal).Value = ImporteTotal;
cmd.Parameters.Add("Serie", SqlDbType.VarChar).Value = Serie; cmd.Parameters.Add("SimCard", SqlDbType.VarChar).Value = SimCard; cmd.CommandTimeout = 100000; SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt);
} } string documento = ""; string documento2 = ""; string clienteLabel; string tipodocumento; if ((TipoDoc == "S3")) { // Si es Boleta clienteLabel = "CLIENTE: "; tipodocumento = "DNI: "; documento = "BOLETA DE VENTA ELECTRONICA"; documento2 = "Boleta de Venta Electronica"; } else { // Si es Factura clienteLabel = "RAZON SOCIAL: "; tipodocumento = "RUC: "; documento = "FACTURA ELECTRONICA"; documento2 = "Factura Electronica"; }
Document doc = new iTextSharp.text.Document(iTextSharp.text.PageSize.LETTER); //Document doc = new Document(); string asd = System.Web.HttpContext.Current.Server.MapPath("~"); string nomarchivopdf = ("\\" + (DNICliente + ("_" + (CorrelativoVta + ("_"
+ (DateTime.Now.ToString("ddMMyyyyhhmmss") + ".pdf")))))); NombreArchivo = (DNICliente + ("_" + (CorrelativoVta + ("_" + (DateTime.Now.ToString("ddMMyyyyhhmmss") + ".pdf"))))); string archivopdf = ("\\ArchivosPDF" + nomarchivopdf); PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream((asd + archivopdf), FileMode.Create)); string Sales = "/images/logomovistar.png"; doc.AddTitle("PDF Entrega"); doc.AddCreator("Salesland"); doc.SetPageSize(iTextSharp.text.PageSize.A4.Rotate()); // Abrimos el archivo doc.Open(); //Img sales //Dim limgSales As iTextSharp.text.Image //limgSales = iTextSharp.text.Image.GetInstance((asd + Sales)) //Dim percentajeSales As Decimal = 0.0F //percentajeSales = (100 / limgSales.Width) //limgSales.ScalePercent((percentajeSales * 100)) string fontpath = (asd + "/less/fonts/FuturaStd-Light.ttf"); string fontpathbold = (asd + "/less/fonts/FuturaStd-Bold.ttf"); FontFactory.Register(fontpath, "fontSalesland"); FontFactory.Register(fontpathbold, "fontSaleslandBold"); iTextSharp.text.Font myfont = new iTextSharp.text.Font(FontFactory.GetFont("Calibri", 7, iTextSharp.text.Font.NORMAL)); iTextSharp.text.Font myfontTituloBOLD = new iTextSharp.text.Font(FontFactory.GetFont("Calibri", 8, iTextSharp.text.Font.BOLD)); iTextSharp.text.Font myfontTitulo = new iTextSharp.text.Font(FontFactory.GetFont("Calibri", 7, iTextSharp.text.Font.NORMAL)); iTextSharp.text.Font myfontheader = new iTextSharp.text.Font(FontFactory.GetFont("Calibri", 10, iTextSharp.text.Font.BOLD)); iTextSharp.text.Font myfontDet = new iTextSharp.text.Font(FontFactory.GetFont("Calibri", 8, iTextSharp.text.Font.NORMAL)); myfontheader.SetColor(0, 0, 0); myfont.SetColor(0, 0, 0); myfontDet.SetColor(0, 0, 0); myfontTitulo.SetColor(0, 0, 0); myfontTituloBOLD.SetColor(0, 0, 0); PdfPTable table1 = new PdfPTable(5); table1.TotalWidth = 800.0F; table1.LockedWidth = true; table1.DefaultCell.Border = iTextSharp.text.Rectangle.NO_BORDER; PdfPTable table2 = new PdfPTable(9); table2.TotalWidth = 800.0F; table2.LockedWidth = true; table2.DefaultCell.Border = iTextSharp.text.Rectangle.NO_BORDER; PdfPTable table3 = new PdfPTable(9); table3.TotalWidth = 800.0F;
table3.LockedWidth = true; table3.DefaultCell.Border = iTextSharp.text.Rectangle.NO_BORDER; PdfPTable table4 = new PdfPTable(9); table4.TotalWidth = 800.0F; table4.LockedWidth = true; table4.DefaultCell.Border = iTextSharp.text.Rectangle.NO_BORDER; float[] sglTblHdWidths1 = new float[5]; sglTblHdWidths1[0] = 3.06F; sglTblHdWidths1[1] = 2.86F; sglTblHdWidths1[2] = 0.26F; sglTblHdWidths1[3] = 3.06F; sglTblHdWidths1[4] = 2.86F; table1.SetWidths(sglTblHdWidths1); float[] sglTblHdWidths2 = new float[9]; sglTblHdWidths2[0] = 0.86F; sglTblHdWidths2[1] = 2.86F; sglTblHdWidths2[2] = 0.86F; sglTblHdWidths2[3] = 0.86F; sglTblHdWidths2[4] = 0.26F; sglTblHdWidths2[5] = 0.86F; sglTblHdWidths2[6] = 2.86F; sglTblHdWidths2[7] = 0.86F; sglTblHdWidths2[8] = 0.86F; table2.SetWidths(sglTblHdWidths2); float[] sglTblHdWidths3 = new float[9]; sglTblHdWidths3[0] = 0.96F; sglTblHdWidths3[1] = 3.86F; sglTblHdWidths3[2] = 1.06F; sglTblHdWidths3[3] = 1.06F; sglTblHdWidths3[4] = 0.26F; sglTblHdWidths3[5] = 0.96F; sglTblHdWidths3[6] = 3.86F; sglTblHdWidths3[7] = 1.06F; sglTblHdWidths3[8] = 1.06F; table3.SetWidths(sglTblHdWidths3); float[] sglTblHdWidths4 = new float[9]; sglTblHdWidths4[0] = 3.86F; sglTblHdWidths4[1] = 1.26F; sglTblHdWidths4[2] = 0.26F; sglTblHdWidths4[3] = 0.96F; sglTblHdWidths4[4] = 0.26F; sglTblHdWidths4[5] = 3.86F; sglTblHdWidths4[6] = 1.26F; sglTblHdWidths4[7] = 0.26F; sglTblHdWidths4[8] = 0.96F; table4.SetWidths(sglTblHdWidths4); //Logo Salesland //Dim img As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(asd
+ Sales)
//Dim desc4 As New PdfPCell(img, True) //desc4.Colspan = 2 //desc4.FixedHeight = 65.0F
//desc4.HorizontalAlignment = Element.ALIGN_LEFT //desc4.Border = iTextSharp.text.Rectangle.NO_BORDER //table1.AddCell(desc4) PdfPCell esp1 = new PdfPCell(new Phrase("SALESLAND INTERNACIONAL S.A.", myfontheader)); esp1.Colspan = 1; esp1.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp1.FixedHeight = 15.0F; esp1.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp1); PdfPCell Header1 = new PdfPCell(new Phrase("R.U.C.: 20543323862", myfontheader)); Header1.Colspan = 1; Header1.HorizontalAlignment = PdfPCell.ALIGN_CENTER; Header1.FixedHeight = 15.0F; Header1.Border = (iTextSharp.text.Rectangle.TOP_BORDER | (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table1.AddCell(Header1); PdfPCell espacio = new PdfPCell(new Phrase("", myfontheader)); espacio.Colspan = 1; espacio.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio.FixedHeight = 15.0F; espacio.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(espacio); PdfPCell esp1C = new PdfPCell(new Phrase("SALESLAND INTERNACIONAL S.A.", myfontheader)); esp1C.Colspan = 1; esp1C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp1C.FixedHeight = 15.0F; esp1C.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp1C); PdfPCell Header1C = new PdfPCell(new Phrase("R.U.C.: 20543323862", myfontheader)); Header1C.Colspan = 1; Header1C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; Header1C.FixedHeight = 15.0F; Header1C.Border = (iTextSharp.text.Rectangle.TOP_BORDER | (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table1.AddCell(Header1C); PdfPCell esp2 = new PdfPCell(new Phrase("Ca. Las Camelias Nro. 280 San Isidro - Lima - LIMA - PERU", myfont)); esp2.Colspan = 1; esp2.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp2.FixedHeight = 15.0F; esp2.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp2); PdfPCell Header2 = new PdfPCell(new Phrase("", myfontheader)); Header2.Colspan = 1; Header2.HorizontalAlignment = PdfPCell.ALIGN_CENTER; Header2.FixedHeight = 15.0F; Header2.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER);
table1.AddCell(Header2); PdfPCell espacio2 = new PdfPCell(new Phrase("", myfontheader)); espacio2.Colspan = 1; espacio2.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio2.FixedHeight = 15.0F; espacio2.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(espacio2); PdfPCell esp2C = new PdfPCell(new Phrase("Ca. Las Camelias Nro. 280 San Isidro - Lima - LIMA - PERU", myfont)); esp2C.Colspan = 1; esp2C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp2C.FixedHeight = 15.0F; esp2C.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp2C); PdfPCell Header2C = new PdfPCell(new Phrase("", myfontheader)); Header2C.Colspan = 1; Header2C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; Header2C.FixedHeight = 15.0F; Header2C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER); table1.AddCell(Header2C); PdfPCell esp3 = new PdfPCell(new Phrase((IdPV + ("-" + dt.Rows[0] ["Almacen"].ToString())), myfontheader)); esp3.Colspan = 1; esp3.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp3.FixedHeight = 25.0F; esp3.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp3); PdfPCell Header3 = new PdfPCell(new Phrase(documento, myfontheader)); Header3.Colspan = 1; Header3.HorizontalAlignment = PdfPCell.ALIGN_CENTER; Header3.FixedHeight = 15F; Header3.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER); table1.AddCell(Header3); PdfPCell espacio3 = new PdfPCell(new Phrase("", myfontheader)); espacio3.Colspan = 1; espacio3.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio3.FixedHeight = 15F; espacio3.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(espacio3); PdfPCell esp3C = new PdfPCell(new Phrase((IdPV + ("-" + dt.Rows[0] ["Almacen"].ToString())), myfontheader)); esp3C.Colspan = 1; esp3C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp3C.FixedHeight = 25F; esp3C.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp3C); PdfPCell Header3C = new PdfPCell(new Phrase(documento, myfontheader)); Header3C.Colspan = 1; Header3C.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
Header3C.FixedHeight = 15.0F; Header3C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER); table1.AddCell(Header3C); PdfPCell esp4 = new PdfPCell(new Phrase(dt.Rows[0]["direccion"].ToString(), myfont)); esp4.Colspan = 1; esp4.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp4.FixedHeight = 25.0F; esp4.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp4); PdfPCell Header4 = new PdfPCell(new Phrase(CorrelativoVta, myfontheader)); Header4.Colspan = 1; Header4.HorizontalAlignment = PdfPCell.ALIGN_CENTER; Header4.VerticalAlignment = PdfPCell.ALIGN_BOTTOM; Header4.FixedHeight = 25.0F; Header4.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.RIGHT_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER)); table1.AddCell(Header4); PdfPCell espacio4 = new PdfPCell(new Phrase("", myfontheader)); espacio4.Colspan = 1; espacio4.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio4.VerticalAlignment = PdfPCell.ALIGN_BOTTOM; espacio4.FixedHeight = 25.0F; espacio4.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(espacio4); PdfPCell esp4C = new PdfPCell(new Phrase(dt.Rows[0] ["direccion"].ToString(), myfont)); esp4C.Colspan = 1; esp4C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp4C.FixedHeight = 25.0F; esp4C.Border = iTextSharp.text.Rectangle.NO_BORDER; table1.AddCell(esp4C); PdfPCell Header4C = new PdfPCell(new Phrase(CorrelativoVta, myfontheader)); Header4C.Colspan = 1; Header4C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; Header4C.VerticalAlignment = PdfPCell.ALIGN_BOTTOM; Header4C.FixedHeight = 25.0F; Header4C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.RIGHT_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER)); table1.AddCell(Header4C); PdfPCell espacio5 = new PdfPCell(new Phrase("", myfont)); espacio5.Colspan = 9; espacio5.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio5.Border = iTextSharp.text.Rectangle.NO_BORDER; espacio5.FixedHeight = 15.0F; table1.AddCell(espacio5); PdfPCell esp5 = new PdfPCell(new Phrase(clienteLabel, myfontTitulo)); esp5.Colspan = 1;
esp5.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp5.Border = iTextSharp.text.Rectangle.NO_BORDER; esp5.FixedHeight = 20.0F; table2.AddCell(esp5); PdfPCell esp6 = new PdfPCell(new Phrase(Cliente.ToUpper(), myfontTituloBOLD)); esp6.Colspan = 1; esp6.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp6.Border = iTextSharp.text.Rectangle.NO_BORDER; esp6.FixedHeight = 20.0F; table2.AddCell(esp6); PdfPCell esp7 = new PdfPCell(new Phrase("FECHA EMISION: ", myfontTitulo)); esp7.Colspan = 1; esp7.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp7.Border = iTextSharp.text.Rectangle.NO_BORDER; esp7.FixedHeight = 20.0F; table2.AddCell(esp7); PdfPCell esp8 = new PdfPCell(new Phrase(dt.Rows[0] ["FechaActual"].ToString(), myfontTituloBOLD)); esp8.Colspan = 1; esp8.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp8.Border = iTextSharp.text.Rectangle.NO_BORDER; esp8.FixedHeight = 20.0F; table2.AddCell(esp8); PdfPCell espacio6 = new PdfPCell(new Phrase("", myfont)); espacio6.Colspan = 1; espacio6.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio6.Border = iTextSharp.text.Rectangle.NO_BORDER; espacio6.FixedHeight = 20.0F; table2.AddCell(espacio6); PdfPCell esp5C = new PdfPCell(new Phrase(clienteLabel, myfontTitulo)); esp5C.Colspan = 1; esp5C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp5C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp5C.FixedHeight = 20.0F; table2.AddCell(esp5C); PdfPCell esp6C = new PdfPCell(new Phrase(Cliente.ToUpper(), myfontTituloBOLD)); esp6C.Colspan = 1; esp6C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp6C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp6C.FixedHeight = 20.0F; table2.AddCell(esp6C); PdfPCell esp7C = new PdfPCell(new Phrase("FECHA EMISION: ", myfontTitulo)); esp7C.Colspan = 1; esp7C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp7C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp7C.FixedHeight = 20.0F; table2.AddCell(esp7C); PdfPCell esp8C = new PdfPCell(new Phrase(dt.Rows[0] ["FechaActual"].ToString(), myfontTituloBOLD));
esp8C.Colspan = 1; esp8C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp8C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp8C.FixedHeight = 20.0F; table2.AddCell(esp8C); PdfPCell esp9 = new PdfPCell(new Phrase(tipodocumento, myfontTitulo)); esp9.Colspan = 1; esp9.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp9.Border = iTextSharp.text.Rectangle.NO_BORDER; esp9.FixedHeight = 20.0F; table2.AddCell(esp9); PdfPCell esp10 = new PdfPCell(new Phrase(DNICliente, myfontTituloBOLD)); esp10.Colspan = 1; esp10.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp10.Border = iTextSharp.text.Rectangle.NO_BORDER; esp10.FixedHeight = 20.0F; table2.AddCell(esp10); PdfPCell esp11 = new PdfPCell(new Phrase("HORA: ", myfontTitulo)); esp11.Colspan = 1; esp11.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp11.Border = iTextSharp.text.Rectangle.NO_BORDER; esp11.FixedHeight = 20.0F; table2.AddCell(esp11); PdfPCell esp12 = new PdfPCell(new Phrase(dt.Rows[0] ["HoraActual"].ToString(), myfont)); esp12.Colspan = 1; esp12.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp12.Border = iTextSharp.text.Rectangle.NO_BORDER; esp12.FixedHeight = 20.0F; table2.AddCell(esp12); PdfPCell espacio7 = new PdfPCell(new Phrase("", myfont)); espacio7.Colspan = 1; espacio7.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio7.Border = iTextSharp.text.Rectangle.NO_BORDER; espacio7.FixedHeight = 20.0F; table2.AddCell(espacio7); PdfPCell esp9C = new PdfPCell(new Phrase(tipodocumento, myfontTitulo)); esp9C.Colspan = 1; esp9C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp9C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp9C.FixedHeight = 20.0F; table2.AddCell(esp9C); PdfPCell esp10C = new PdfPCell(new Phrase(DNICliente, myfontTituloBOLD)); esp10C.Colspan = 1; esp10C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp10C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp10C.FixedHeight = 20.0F; table2.AddCell(esp10C); PdfPCell esp11C = new PdfPCell(new Phrase("HORA: ", myfontTitulo)); esp11C.Colspan = 1; esp11C.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
esp11C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp11C.FixedHeight = 20.0F; table2.AddCell(esp11C); PdfPCell esp12C = new PdfPCell(new Phrase(dt.Rows[0] ["HoraActual"].ToString(), myfont)); esp12C.Colspan = 1; esp12C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp12C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp12C.FixedHeight = 20.0F; table2.AddCell(esp12C); PdfPCell esp13 = new PdfPCell(new Phrase("DIRECCION: ", myfontTitulo)); esp13.Colspan = 1; esp13.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp13.Border = iTextSharp.text.Rectangle.NO_BORDER; esp13.FixedHeight = 20.0F; table2.AddCell(esp13); PdfPCell esp14 = new PdfPCell(new Phrase(dt.Rows[0]["Zonal"].ToString(), myfont)); esp14.Colspan = 3; esp14.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp14.Border = iTextSharp.text.Rectangle.NO_BORDER; esp14.FixedHeight = 20.0F; table2.AddCell(esp14); PdfPCell espacio8 = new PdfPCell(new Phrase("", myfont)); espacio8.Colspan = 1; espacio8.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio8.Border = iTextSharp.text.Rectangle.NO_BORDER; espacio8.FixedHeight = 20.0F; table2.AddCell(espacio8); PdfPCell esp13C = new PdfPCell(new Phrase("DIRECCION: ", myfontTitulo)); esp13C.Colspan = 1; esp13C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp13C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp13C.FixedHeight = 20.0F; table2.AddCell(esp13C); PdfPCell esp14C = new PdfPCell(new Phrase(dt.Rows[0]["Zonal"].ToString(), myfont)); esp14C.Colspan = 3; esp14C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp14C.Border = iTextSharp.text.Rectangle.NO_BORDER; esp14C.FixedHeight = 20.0F; table2.AddCell(esp14C); PdfPCell esp15 = new PdfPCell(new Phrase("CANTIDAD", myfontTituloBOLD)); esp15.Colspan = 1; esp15.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp15.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp15.FixedHeight = 15.0F; esp15.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER); table3.AddCell(esp15); PdfPCell esp16 = new PdfPCell(new Phrase("DESCRIPCION", myfontTituloBOLD));
esp16.Colspan = 1; esp16.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp16.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp16.FixedHeight = 15.0F; esp16.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER); table3.AddCell(esp16); PdfPCell esp17 = new PdfPCell(new Phrase("P.UNIT.", myfontTituloBOLD)); esp17.Colspan = 1; esp17.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp17.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp17.FixedHeight = 15.0F; esp17.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER); table3.AddCell(esp17); PdfPCell esp18 = new PdfPCell(new Phrase("TOTAL", myfontTituloBOLD)); esp18.Colspan = 1; esp18.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp18.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp18.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER); esp18.FixedHeight = 15.0F; table3.AddCell(esp18); PdfPCell espacio9 = new PdfPCell(new Phrase("", myfont)); espacio9.Colspan = 1; espacio9.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio9.Border = iTextSharp.text.Rectangle.NO_BORDER; espacio9.FixedHeight = 15.0F; table3.AddCell(espacio9); PdfPCell esp15C = new PdfPCell(new Phrase("CANTIDAD", myfontTituloBOLD)); esp15C.Colspan = 1; esp15C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp15C.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp15C.FixedHeight = 15.0F; esp15C.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER); table3.AddCell(esp15C); PdfPCell esp16C = new PdfPCell(new Phrase("DESCRIPCION", myfontTituloBOLD)); esp16C.Colspan = 1; esp16C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp16C.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp16C.FixedHeight = 15.0F; esp16C.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER); table3.AddCell(esp16C); PdfPCell esp17C = new PdfPCell(new Phrase("P.UNIT.", myfontTituloBOLD)); esp17C.Colspan = 1; esp17C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp17C.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp17C.FixedHeight = 15.0F; esp17C.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER);
table3.AddCell(esp17C); PdfPCell esp18C = new PdfPCell(new Phrase("TOTAL", myfontTituloBOLD)); esp18C.Colspan = 1; esp18C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp18C.VerticalAlignment = PdfPCell.ALIGN_MIDDLE; esp18C.FixedHeight = 15.0F; esp18C.Border = (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER); table3.AddCell(esp18C); PdfPCell esp19 = new PdfPCell(new Phrase("1 UND".ToString(), myfontDet)); esp19.Colspan = 1; esp19.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp19.Border = iTextSharp.text.Rectangle.NO_BORDER; esp19.FixedHeight = 30.0F; table3.AddCell(esp19); PdfPCell esp20 = new PdfPCell(new Phrase((dt.Rows[0]["Modelo"].ToString() + (Serie + (" " + (SimCard + (" " + Telefono))))), myfontDet)); esp20.Colspan = 1; esp20.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp20.Border = iTextSharp.text.Rectangle.NO_BORDER; esp20.FixedHeight = 30.0F; table3.AddCell(esp20); PdfPCell esp21 = new PdfPCell(new Phrase(ImporteTotal.ToString().Replace(",", "."), myfontDet)); esp21.Colspan = 1; esp21.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp21.Border = iTextSharp.text.Rectangle.NO_BORDER; esp21.FixedHeight = 30.0F; table3.AddCell(esp21); PdfPCell esp22 = new PdfPCell(new Phrase(ImporteTotal.ToString().Replace(",", "."), myfontDet)); esp22.Colspan = 1; esp22.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp22.Border = iTextSharp.text.Rectangle.NO_BORDER; esp22.FixedHeight = 30.0F; table3.AddCell(esp22); PdfPCell espacio10 = new PdfPCell(new Phrase("", myfont)); espacio10.Colspan = 1; espacio10.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio10.FixedHeight = 30.0F; espacio10.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(espacio10); PdfPCell esp19C = new PdfPCell(new Phrase("1 UND", myfontDet)); esp19C.Colspan = 1; esp19C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp19C.FixedHeight = 30.0F; esp19C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp19C); PdfPCell esp20C = new PdfPCell(new Phrase((dt.Rows[0]["Modelo"].ToString() + (Serie + (" "
+ (SimCard + (" " + Telefono))))), myfontDet)); esp20C.Colspan = 1; esp20C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp20C.FixedHeight = 30.0F; esp20C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp20C); PdfPCell esp21C = new PdfPCell(new Phrase(ImporteTotal.ToString().Replace(",", "."), myfontDet)); esp21C.Colspan = 1; esp21C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp21C.FixedHeight = 30.0F; esp21C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp21C); PdfPCell esp22C = new PdfPCell(new Phrase(ImporteTotal.ToString().Replace(",", "."), myfontDet)); esp22C.Colspan = 1; esp22C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp22C.FixedHeight = 30.0F; esp22C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp22C); //////////////////////////////// PdfPCell esp23 = new PdfPCell(new Phrase("1 UND", myfontDet)); esp23.Colspan = 1; esp23.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp23.FixedHeight = 30.0F; esp23.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp23); PdfPCell esp24 = new PdfPCell(new Phrase("Bonificación simcard VR S/1.00", myfontDet)); esp24.Colspan = 1; esp24.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp24.FixedHeight = 30.0F; esp24.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp24); PdfPCell esp25 = new PdfPCell(new Phrase("0.00", myfontDet)); esp25.Colspan = 1; esp25.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp25.FixedHeight = 30.0F; esp25.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp25); PdfPCell esp26 = new PdfPCell(new Phrase("0.00", myfontDet)); esp26.Colspan = 1; esp26.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp26.FixedHeight = 30.0F; esp26.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp26); PdfPCell espacio11 = new PdfPCell(new Phrase("", myfont)); espacio11.Colspan = 1; espacio11.HorizontalAlignment = PdfPCell.ALIGN_CENTER; espacio11.FixedHeight = 30.0F; espacio11.Border = iTextSharp.text.Rectangle.NO_BORDER;
table3.AddCell(espacio11); PdfPCell esp23C = new PdfPCell(new Phrase("1 UND", myfontDet)); esp23C.Colspan = 1; esp23C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp23C.FixedHeight = 30.0F; esp23C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp23C); PdfPCell esp24C = new PdfPCell(new Phrase("Bonificación simcard VR S/1.00", myfontDet)); esp24C.Colspan = 1; esp24C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp24C.FixedHeight = 30.0F; esp24C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp24C); PdfPCell esp25C = new PdfPCell(new Phrase("0.00", myfontDet)); esp25C.Colspan = 1; esp25C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp25C.FixedHeight = 30.0F; esp25C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp25C); PdfPCell esp26C = new PdfPCell(new Phrase("0.00", myfontDet)); esp26C.Colspan = 1; esp26C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp26C.FixedHeight = 30.0F; esp26C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp26C); PdfPCell espacio12 = new PdfPCell(new Phrase(" ")); espacio12.Colspan = 9; espacio12.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio12.FixedHeight = 15.0F; espacio12.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(espacio12); PdfPCell esp27 = new PdfPCell(new Phrase((dt.Rows[0] ["ValorDocumentoVta"].ToString() + (" - " + dt.Rows[0]["Usuario"].ToString())), myfontDet)); esp27.Colspan = 4; esp27.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp27.FixedHeight = 30.0F; esp27.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp27); PdfPCell espacio13 = new PdfPCell(new Phrase(" ")); espacio13.Colspan = 1; espacio13.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio13.FixedHeight = 30.0F; espacio13.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(espacio13); PdfPCell esp27C = new PdfPCell(new Phrase((dt.Rows[0] ["ValorDocumentoVta"].ToString() + (" - " + dt.Rows[0]["Usuario"].ToString())), myfontDet)); esp27C.Colspan = 4; esp27C.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
esp27C.FixedHeight = 30.0F; esp27C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp27C); PdfPCell espacio14 = new PdfPCell(new Phrase(" ")); espacio14.Colspan = 9; espacio14.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio14.FixedHeight = 150.0F; espacio14.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(espacio14); PdfPCell esp28 = new PdfPCell(new Phrase(("SON: " + dt.Rows[0] ["ImporteLetra"].ToString()), myfontTituloBOLD)); esp28.Colspan = 4; esp28.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp28.FixedHeight = 25.0F; esp28.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp28); PdfPCell espacio15 = new PdfPCell(new Phrase(" ")); espacio15.Colspan = 1; espacio15.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio15.FixedHeight = 25.0F; espacio15.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(espacio15); PdfPCell esp28C = new PdfPCell(new Phrase(("SON: " + dt.Rows[0] ["ImporteLetra"].ToString()), myfontTituloBOLD)); esp28C.Colspan = 4; esp28C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp28C.FixedHeight = 25.0F; esp28C.Border = iTextSharp.text.Rectangle.NO_BORDER; table3.AddCell(esp28C); PdfPCell esp29 = new PdfPCell(new Phrase(("HASH: " + CodigoHash), myfontTituloBOLD)); esp29.Colspan = 1; esp29.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp29.FixedHeight = 15.0F; esp29.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp29); PdfPCell esp30 = new PdfPCell(new Phrase("OP.GRAVADA", myfontTituloBOLD)); esp30.Colspan = 1; esp30.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp30.FixedHeight = 15.0F; esp30.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp30); PdfPCell esp31 = new PdfPCell(new Phrase("S/", myfontDet)); esp31.Colspan = 1; esp31.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp31.FixedHeight = 15.0F; esp31.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp31); PdfPCell esp32 = new PdfPCell(new Phrase(Importe.ToString().Replace(",", "."), myfontDet));
esp32.Colspan = 1; esp32.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp32.FixedHeight = 15.0F; esp32.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp32); PdfPCell espacio16 = new PdfPCell(new Phrase("", myfontDet)); espacio16.Colspan = 1; espacio16.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio16.FixedHeight = 15.0F; espacio16.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(espacio16); PdfPCell esp29C = new PdfPCell(new Phrase(("HASH: " + CodigoHash), myfontTituloBOLD)); esp29C.Colspan = 1; esp29C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp29C.FixedHeight = 15.0F; esp29C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER| (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp29C); PdfPCell esp30C = new PdfPCell(new Phrase("OP.GRAVADA", myfontTituloBOLD)); esp30C.Colspan = 1; esp30C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp30C.FixedHeight = 15.0F; esp30C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp30C); PdfPCell esp31C = new PdfPCell(new Phrase("S/", myfontDet)); esp31C.Colspan = 1; esp31C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp31C.FixedHeight = 15.0F; esp31C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp31C); PdfPCell esp32C = new PdfPCell(new Phrase(Importe.ToString().Replace(",", "."), myfontDet)); esp32C.Colspan = 1; esp32C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp32C.FixedHeight = 15.0F; esp32C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp32C); PdfPCell esp33 = new PdfPCell(new Phrase("Autorizado mediante resolución Nro. 0180050002442/SUNAT.", myfontDet)); esp33.Colspan = 1; esp33.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp33.FixedHeight = 15.0F; esp33.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER); table4.AddCell(esp33); PdfPCell esp34 = new PdfPCell(new Phrase("OP.EXONERADA", myfontTituloBOLD)); esp34.Colspan = 1; esp34.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
esp34.FixedHeight = 15.0F; esp34.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp34); PdfPCell esp35 = new PdfPCell(new Phrase("S/", myfontDet)); esp35.Colspan = 1; esp35.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp35.FixedHeight = 15.0F; esp35.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp35); PdfPCell esp36 = new PdfPCell(new Phrase(ImporteExonerado.ToString().Replace(",", "."), myfontDet)); esp36.Colspan = 1; esp36.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp36.FixedHeight = 15.0F; esp36.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp36); PdfPCell espacio17 = new PdfPCell(new Phrase("", myfontDet)); espacio17.Colspan = 1; espacio17.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio17.FixedHeight = 15.0F; espacio17.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(espacio17); PdfPCell esp33C = new PdfPCell(new Phrase("Autorizado mediante resolución Nro. 0180050002442/SUNAT.", myfontDet)); esp33C.Colspan = 1; esp33C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp33C.FixedHeight = 15.0F; esp33C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER); table4.AddCell(esp33C); PdfPCell esp34C = new PdfPCell(new Phrase("OP.EXONERADA", myfontTituloBOLD)); esp34C.Colspan = 1; esp34C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp34C.FixedHeight = 15.0F; esp34C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp34C); PdfPCell esp35C = new PdfPCell(new Phrase("S/", myfontDet)); esp35C.Colspan = 1; esp35C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp35C.FixedHeight = 15.0F; esp35C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp35C); PdfPCell esp36C = new PdfPCell(new Phrase(ImporteExonerado.ToString().Replace(",", "."), myfontDet)); esp36C.Colspan = 1; esp36C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp36C.FixedHeight = 15.0F; esp36C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp36C);
PdfPCell esp37 = new PdfPCell(new Phrase(("Representación impresa de la " + documento2), myfontDet)); esp37.Colspan = 1; esp37.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp37.FixedHeight = 15.0F; esp37.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER); table4.AddCell(esp37); PdfPCell esp38 = new PdfPCell(new Phrase("I.G.V(18%)", myfontTituloBOLD)); esp38.Colspan = 1; esp38.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp38.FixedHeight = 15.0F; esp38.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp38); PdfPCell esp39 = new PdfPCell(new Phrase("S/", myfontDet)); esp39.Colspan = 1; esp39.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp39.FixedHeight = 15.0F; esp39.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp39); PdfPCell esp40 = new PdfPCell(new Phrase(IGV.ToString().Replace(",", "."), myfontDet)); esp40.Colspan = 1; esp40.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp40.FixedHeight = 15.0F; esp40.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp40); PdfPCell espacio18 = new PdfPCell(new Phrase("", myfontDet)); espacio18.Colspan = 1; espacio18.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio18.FixedHeight = 15.0F; espacio18.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(espacio18); PdfPCell esp37C = new PdfPCell(new Phrase(("Representación impresa de la " + documento2), myfontDet)); esp37C.Colspan = 1; esp37C.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp37C.FixedHeight = 15.0F; esp37C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER); table4.AddCell(esp37C); PdfPCell esp38C = new PdfPCell(new Phrase("I.G.V(18%)", myfontTituloBOLD)); esp38C.Colspan = 1; esp38C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp38C.FixedHeight = 15.0F; esp38C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp38C); PdfPCell esp39C = new PdfPCell(new Phrase("S/", myfontDet)); esp39C.Colspan = 1; esp39C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT;
esp39C.FixedHeight = 15.0F; esp39C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp39C); PdfPCell esp40C = new PdfPCell(new Phrase(IGV.ToString().Replace(",", "."), myfontDet)); esp40C.Colspan = 1; esp40C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp40C.FixedHeight = 15.0F; esp40C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | iTextSharp.text.Rectangle.RIGHT_BORDER)); table4.AddCell(esp40C); PdfPCell esp41 = new PdfPCell(new Phrase("Consulte su documento en http://salesland.midata.pe", myfontDet)); esp41.Colspan = 1; esp41.HorizontalAlignment = PdfPCell.ALIGN_CENTER; esp41.FixedHeight = 15.0F; esp41.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.RIGHT_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER)); table4.AddCell(esp41); PdfPCell esp42 = new PdfPCell(new Phrase("IMPORTE TOTAL", myfontTituloBOLD)); esp42.Colspan = 1; esp42.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp42.FixedHeight = 15.0F; esp42.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp42); PdfPCell esp43 = new PdfPCell(new Phrase("S/", myfontTituloBOLD)); esp43.Colspan = 1; esp43.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp43.FixedHeight = 15.0F; esp43.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp43); PdfPCell esp44 = new PdfPCell(new Phrase(ImporteTotal.ToString().Replace(",", "."), myfontTituloBOLD)); esp44.Colspan = 1; esp44.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp44.FixedHeight = 15.0F; esp44.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | (iTextSharp.text.Rectangle.RIGHT_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER))); table4.AddCell(esp44); PdfPCell espacio19 = new PdfPCell(new Phrase("", myfontDet)); espacio19.Colspan = 1; espacio19.HorizontalAlignment = PdfPCell.ALIGN_LEFT; espacio19.FixedHeight = 15.0F; espacio19.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(espacio19); PdfPCell esp41C = new PdfPCell(new Phrase("Consulte su documento en http://salesland.midata.pe", myfontDet)); esp41C.Colspan = 1; esp41C.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
esp41C.FixedHeight = 15.0F; esp41C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER| (iTextSharp.text.Rectangle.RIGHT_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER)); table4.AddCell(esp41C); PdfPCell esp42C = new PdfPCell(new Phrase("IMPORTE TOTAL", myfontTituloBOLD)); esp42C.Colspan = 1; esp42C.FixedHeight = 15.0F; esp42C.HorizontalAlignment = PdfPCell.ALIGN_LEFT; esp42C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp42C); PdfPCell esp43C = new PdfPCell(new Phrase("S/", myfontTituloBOLD)); esp43C.Colspan = 1; esp43C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp43C.FixedHeight = 15.0F; esp43C.Border = iTextSharp.text.Rectangle.NO_BORDER; table4.AddCell(esp43C); PdfPCell esp44C = new PdfPCell(new Phrase(ImporteTotal.ToString().Replace(",", "."), myfontTituloBOLD)); esp44C.Colspan = 1; esp44C.HorizontalAlignment = PdfPCell.ALIGN_RIGHT; esp44C.FixedHeight = 15.0F; esp44C.Border = (iTextSharp.text.Rectangle.LEFT_BORDER | (iTextSharp.text.Rectangle.TOP_BORDER | (iTextSharp.text.Rectangle.RIGHT_BORDER | iTextSharp.text.Rectangle.BOTTOM_BORDER))); table4.AddCell(esp44C); doc.Add(table1); doc.Add(table2); doc.Add(table3); doc.Add(table4); doc.NewPage(); doc.Close(); writer.Close(); }