Cambios para que no cree el pdf automaticamente
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
@using PuppeteerSharp
|
||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||
@inject ProtectedLocalStorage ProtectedLocalStore
|
||||
@inject IJSRuntime JS
|
||||
@inject IJSRuntime JSA
|
||||
|
||||
@rendermode InteractiveServer
|
||||
@inject NavigationManager Navigation
|
||||
@@ -52,7 +52,7 @@
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
|
||||
@* <Button @onclick="imprimir">Imprimir</Button> *@
|
||||
@* <Button @onclick="imprimir">Imprimir</Button> *@
|
||||
|
||||
|
||||
<Tabs>
|
||||
@@ -60,7 +60,7 @@
|
||||
<Content>
|
||||
<div class="CajaTab p-2">
|
||||
<HerramientaCASA.Components.Pages.HerramientaCASATabs.DespachoProfesional objetoCASA="casa"></HerramientaCASA.Components.Pages.HerramientaCASATabs.DespachoProfesional>
|
||||
</div>
|
||||
</div>
|
||||
</Content>
|
||||
</Tab>
|
||||
<Tab Title="Trabajo Profesional" Name="tabTrabajoProf">
|
||||
@@ -72,7 +72,7 @@
|
||||
</Tab>
|
||||
<Tab Title="Costes de producción" Name="tabCosteProd">
|
||||
<Content>
|
||||
<div class="CajaTab p-2">
|
||||
<div class="CajaTab p-2">
|
||||
<HerramientaCASA.Components.Pages.HerramientaCASATabs.CostesProduccion objetoCASA="casa"></HerramientaCASA.Components.Pages.HerramientaCASATabs.CostesProduccion>
|
||||
</div>
|
||||
</Content>
|
||||
@@ -81,7 +81,7 @@
|
||||
</div>
|
||||
|
||||
<div style="display:none">
|
||||
<HerramientaCASA.Components.Pages.Imprimir.HerramientaCASAImprimir objetoCASA="casa"></HerramientaCASA.Components.Pages.Imprimir.HerramientaCASAImprimir>
|
||||
<HerramientaCASA.Components.Pages.Imprimir.HerramientaCASAImprimir objetoCASA="casa"></HerramientaCASA.Components.Pages.Imprimir.HerramientaCASAImprimir>
|
||||
</div>
|
||||
@code {
|
||||
[Parameter]
|
||||
@@ -169,9 +169,9 @@
|
||||
|
||||
casa = System.Text.Json.JsonSerializer.Deserialize<CASA>(CASAJson);
|
||||
|
||||
if ((simu.FechaModificacion != null && simu.FechaModificacion < fechaActVar) || (simu.FechaModificacion==null && simu.FechaCreacion<fechaActVar))
|
||||
if ((simu.FechaModificacion != null && simu.FechaModificacion < fechaActVar) || (simu.FechaModificacion == null && simu.FechaCreacion < fechaActVar))
|
||||
{
|
||||
actualizado = false;
|
||||
actualizado = false;
|
||||
}
|
||||
TextoSuperior = "Modificando simulación \"" + casa.NombreSimulacion + "\"";
|
||||
TituloBoton = "Modificar";
|
||||
@@ -192,15 +192,15 @@
|
||||
|
||||
string jsonObjeto = Newtonsoft.Json.JsonConvert.SerializeObject(casa);
|
||||
|
||||
if (string.IsNullOrEmpty( idSimulador))
|
||||
if (string.IsNullOrEmpty(idSimulador))
|
||||
{
|
||||
if (bd.simulaciones.Any(x => x.Descripcion == casa.NombreSimulacion && x.idTipoSimulacion == idtipoSimulacion))
|
||||
if (bd.simulaciones.Any(x => x.Descripcion == casa.NombreSimulacion && x.idTipoSimulacion == idtipoSimulacion))
|
||||
{
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Danger,
|
||||
Message = $"Ya existe una simulación con el mismo nombre.",
|
||||
});
|
||||
{
|
||||
Type = ToastType.Danger,
|
||||
Message = $"Ya existe una simulación con el mismo nombre.",
|
||||
});
|
||||
cerrarPopupGuardar();
|
||||
}
|
||||
else
|
||||
@@ -215,10 +215,10 @@
|
||||
if (listadoSimulacionesExistentes.Any(x => x.Descripcion == casa.NombreSimulacion))
|
||||
{
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Danger,
|
||||
Message = $"Ya existe una simulación con el mismo nombre.",
|
||||
});
|
||||
{
|
||||
Type = ToastType.Danger,
|
||||
Message = $"Ya existe una simulación con el mismo nombre.",
|
||||
});
|
||||
cerrarPopupGuardar();
|
||||
}
|
||||
else
|
||||
@@ -233,22 +233,22 @@
|
||||
int idSimulacionCreada = UtilidadesCASA.crearObjeto(bd, HerramientaCASA.UtilidadesCASA.TiposSimulaciones.CASA, jsonObjeto, casa.NombreSimulacion, "casa.json", idUser);
|
||||
string link = "/HerramientaCASAS?idSimulador=" + tsUtilidades.crypt.FEncS(idSimulacionCreada.ToString(), "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.:/-*", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.:/-*", 875421649);
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Simulación creada correctamente.",
|
||||
});
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Simulación creada correctamente.",
|
||||
});
|
||||
|
||||
Navigation.NavigateTo(link, true);
|
||||
}
|
||||
private void actualizarSimulacion(string jsonObjeto)
|
||||
{
|
||||
UtilidadesCASA.actualziarObjeto(bd, jsonObjeto, casa.NombreSimulacion, idSimulador);
|
||||
UtilidadesCASA.actualziarObjeto(bd, jsonObjeto, casa.NombreSimulacion, idSimulador);
|
||||
cerrarPopupGuardar();
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Simulación actualizada correctamente.",
|
||||
});
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Simulación actualizada correctamente.",
|
||||
});
|
||||
}
|
||||
|
||||
private void clonarCASA()
|
||||
@@ -287,7 +287,7 @@
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtml");
|
||||
var contenidoHtml = await JSA.InvokeAsync<string>("obtenerContenidoHtmlDespacho");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -299,17 +299,15 @@
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
var fileName = $"factura_{DateTime.Now:yyyyMMddHHmmss}.pdf";
|
||||
var filePath = Path.Combine("wwwroot", fileName);
|
||||
|
||||
var browserFetcher = new BrowserFetcher();
|
||||
await browserFetcher.DownloadAsync();
|
||||
|
||||
using var browser = await Puppeteer.LaunchAsync(new LaunchOptions
|
||||
{
|
||||
Headless = true,
|
||||
Args = new[] { "--ignore-certificate-errors" }
|
||||
});
|
||||
{
|
||||
Headless = true,
|
||||
Args = new[] { "--ignore-certificate-errors" }
|
||||
});
|
||||
|
||||
using var page = await browser.NewPageAsync();
|
||||
|
||||
@@ -317,20 +315,18 @@
|
||||
|
||||
await page.SetContentAsync(fullHtml);
|
||||
|
||||
await page.PdfAsync(filePath, new PdfOptions
|
||||
var pdfBytes = await page.PdfDataAsync(new PdfOptions
|
||||
{
|
||||
PrintBackground = true,
|
||||
Format = PuppeteerSharp.Media.PaperFormat.A4,
|
||||
MarginOptions = new PuppeteerSharp.Media.MarginOptions
|
||||
{
|
||||
PrintBackground = true,
|
||||
Format = PuppeteerSharp.Media.PaperFormat.A4,
|
||||
MarginOptions = new PuppeteerSharp.Media.MarginOptions
|
||||
{
|
||||
Top = "20mm",
|
||||
Bottom = "20mm"
|
||||
}
|
||||
});
|
||||
Top = "20mm",
|
||||
Bottom = "20mm"
|
||||
}
|
||||
});
|
||||
|
||||
pdfUrl = "/" + fileName;
|
||||
|
||||
Navigation.NavigateTo(pdfUrl, true);
|
||||
await JSA.InvokeVoidAsync("mostrarPdf", Convert.ToBase64String(pdfBytes));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -338,16 +334,24 @@
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtml() {
|
||||
const DespachoImprimir = document.getElementById('DespachoImprimir');
|
||||
function obtenerContenidoHtmlDespacho() {
|
||||
let DespachoImprimir = document.getElementById('DespachoImprimir');
|
||||
// const contenido2 = document.getElementById('CosteExterna');
|
||||
|
||||
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
let byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
let blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
let url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
|
||||
|
||||
// async function obtenerTablasDeOtraPagina(url) {
|
||||
// const response = await fetch(url);
|
||||
// const texto = await response.text();
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtml");
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtmlURBAN");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
await page.SetContentAsync(fullHtml);
|
||||
|
||||
await page.PdfAsync(filePath, new PdfOptions
|
||||
var pdfBytes = await page.PdfDataAsync(new PdfOptions
|
||||
{
|
||||
PrintBackground = true,
|
||||
Format = PuppeteerSharp.Media.PaperFormat.A4,
|
||||
@@ -302,9 +302,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
pdfUrl = "/" + fileName;
|
||||
|
||||
Navigation.NavigateTo(pdfUrl, true);
|
||||
await JS.InvokeVoidAsync("mostrarPdf", Convert.ToBase64String(pdfBytes));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -312,11 +310,18 @@
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtml() {
|
||||
function obtenerContenidoHtmlURBAN() {
|
||||
const DespachoImprimir = document.getElementById('DespachoURBANImprimir');
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
const byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
const blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
const url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
</script>
|
||||
@@ -64,8 +64,8 @@
|
||||
<td class="colorFilasIntro w4">Incremento por externalización</td>
|
||||
<td class="text-end">
|
||||
<span>
|
||||
@objetoCASA.CostesProduccion.CoeficienteCostesExternalizacion
|
||||
</span>
|
||||
@objetoCASA.CostesProduccion.CoeficienteCostesExternalizacion %
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -138,7 +138,7 @@
|
||||
<tr>
|
||||
<td class="colorFilasIntro fw-bold">Plazo de presentación de la documentación:</td>
|
||||
<td class="text-end">
|
||||
<span class="inputForm formatoMoneda text-end">@objetoCASA.CostesProduccion.PlazoPresentacionDocumentos</span>
|
||||
<span class="inputForm formatoMoneda text-end">@objetoCASA.CostesProduccion.PlazoPresentacionDocumentos meses</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -160,14 +160,14 @@
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold w-75">Trabajos</th>
|
||||
<th class="colorB fw-bold ">Horas</th>
|
||||
<th class="colorB fw-bold">Trabajos</th>
|
||||
<th class="colorB fw-bold">Horas</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="colorB fw-bold">Horas elaboración documentación</td>
|
||||
<td class="text-end">@objetoCASA.TrabajoProfesional.HorasTPEDocumentacion.MilesYDecimales() h</td>
|
||||
<td class="text-start">@objetoCASA.TrabajoProfesional.HorasTPEDocumentacion.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -185,12 +185,16 @@
|
||||
<td class="text-end">@objetoCASA.TrabajoProfesional.HorasTPEDireccion.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorC fw-bold w4">HORAS TRABAJO PROFESIONAL</td>
|
||||
<td class="text-end">@objetoCASA.TrabajoProfesional.HorasTPE.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="TotalesTabla text-end fw-bold">Horas trabajo profesional @objetoCASA.TrabajoProfesional.TotalHorasTPE.MilesYDecimales() h</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -201,42 +205,36 @@
|
||||
<label style="color: #078b98 !important"><b>Costes de Producción</b></label>
|
||||
</div>
|
||||
|
||||
<div class="col-8 mx-auto">
|
||||
<div class="col-8 mx-auto mb-4">
|
||||
|
||||
<div style="height: 49px;">
|
||||
<b>Costes Asociados a los Servicios de Arquitectura</b>
|
||||
</div>
|
||||
|
||||
<table class="table tablaCACOA tablaCACOA2 mb-0">
|
||||
<table class="tablaAlter" style="width:100%">
|
||||
<tr>
|
||||
<td class="tdAlter TotalesTabla" style="font-size:12px;"> COSTES DE PRODUCCIÓN DEL TRABAJO PROFESIONAL: </td>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="colorB fw-bold w-75">Concepto</th>
|
||||
<th class="colorB fw-bold text-end"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tdAlter fw-bold " style="background:#ffc107;">COSTES DE PRODUCCIÓN DEL TRABAJO PROFESIONAL</td>
|
||||
<td class="text-end"><span> @objetoCASA.CostesProduccion.CostesProduccionTrabProf.MilesYDecimales() €</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="colorFilasIntro w4"><b>Beneficio</b> (antes de impuestos)</td>
|
||||
<td class="text-end">
|
||||
<span class="inputForm formatoMoneda">@objetoCASA.CostesProduccion.Beneficio </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="text-end fw-bold">
|
||||
Precio del trabajo profesional: <span>@objetoCASA.CostesProduccion.PrecioTrabProf.MilesYDecimales() € </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<td class="tdAlter TotalesTabla tdAlineadoDerecha" style="width: 30%; font-weight:bold;font-size:12px;">
|
||||
@objetoCASA.CostesProduccion.CostesProduccionTrabProf.MilesYDecimales() €
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="TotalesTabla" style="font-size:12px;"><b>Beneficio</b> (antes de impuestos) </td>
|
||||
<td class="tdAlineadoDerecha TotalesTabla" style="font-size:12px;">
|
||||
<div class="justify-content-end" style="gap:3px;">
|
||||
<span>@objetoCASA.CostesProduccion.Beneficio %</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="text-end fw-bold TotalesTabla tablaCACOA">
|
||||
Precio del trabajo profesional: <span>@objetoCASA.CostesProduccion.PrecioTrabProf.MilesYDecimales() € </span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@if (objetoCASA.CostesProduccion.OtrosTrabajos.Count != 0)
|
||||
@@ -261,7 +259,7 @@
|
||||
{
|
||||
<tr>
|
||||
<td>@otroTrabajo.Denominacion</td>
|
||||
<td class="text-end">@otroTrabajo.Coste.MilesYDecimales()</td>
|
||||
<td class="text-end">@otroTrabajo.Coste.MilesYDecimales() €</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
@@ -279,7 +277,7 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="text-end fw-bold TotalesTabla" style="background: #ffc107;">
|
||||
<td colspan="2" class="text-end fw-bold TotalesTabla">
|
||||
Precio del encargo: <span>@objetoCASA.CostesProduccion.PrecioDelEncargo.MilesYDecimales() € </span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtml");
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtmlLicitaciones");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -413,9 +413,6 @@
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
var fileName = $"factura_{DateTime.Now:yyyyMMddHHmmss}.pdf";
|
||||
var filePath = Path.Combine("wwwroot", fileName);
|
||||
|
||||
var browserFetcher = new BrowserFetcher();
|
||||
await browserFetcher.DownloadAsync();
|
||||
|
||||
@@ -431,20 +428,18 @@
|
||||
|
||||
await page.SetContentAsync(fullHtml);
|
||||
|
||||
await page.PdfAsync(filePath, new PdfOptions
|
||||
var pdfBytes = await page.PdfDataAsync(new PdfOptions
|
||||
{
|
||||
PrintBackground = true,
|
||||
Format = PuppeteerSharp.Media.PaperFormat.A4,
|
||||
MarginOptions = new PuppeteerSharp.Media.MarginOptions
|
||||
{
|
||||
PrintBackground = true,
|
||||
Format = PuppeteerSharp.Media.PaperFormat.A4,
|
||||
MarginOptions = new PuppeteerSharp.Media.MarginOptions
|
||||
{
|
||||
Top = "20mm",
|
||||
Bottom = "20mm"
|
||||
}
|
||||
});
|
||||
Top = "20mm",
|
||||
Bottom = "20mm"
|
||||
}
|
||||
});
|
||||
|
||||
pdfUrl = "/" + fileName;
|
||||
|
||||
Navigation.NavigateTo(pdfUrl, true);
|
||||
await JS.InvokeVoidAsync("mostrarPdf", Convert.ToBase64String(pdfBytes));
|
||||
}
|
||||
|
||||
|
||||
@@ -487,11 +482,18 @@
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtml() {
|
||||
const LicitacionImprimir = document.getElementById('LicitacionesCASAImprimir');
|
||||
function obtenerContenidoHtmlLicitaciones() {
|
||||
let LicitacionImprimir = document.getElementById('LicitacionesCASAImprimir');
|
||||
|
||||
let html = LicitacionImprimir.outerHTML;
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
let byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
let blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
let url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
</script>
|
||||
@@ -470,7 +470,7 @@
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtml");
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtmlLiciUrban");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -500,7 +500,7 @@
|
||||
|
||||
await page.SetContentAsync(fullHtml);
|
||||
|
||||
await page.PdfAsync(filePath, new PdfOptions
|
||||
var pdfBytes = await page.PdfDataAsync(new PdfOptions
|
||||
{
|
||||
PrintBackground = true,
|
||||
Format = PuppeteerSharp.Media.PaperFormat.A4,
|
||||
@@ -511,9 +511,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
pdfUrl = "/" + fileName;
|
||||
|
||||
Navigation.NavigateTo(pdfUrl, true);
|
||||
await JS.InvokeVoidAsync("mostrarPdf", Convert.ToBase64String(pdfBytes));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -521,11 +519,18 @@
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtml() {
|
||||
function obtenerContenidoHtmlLiciUrban() {
|
||||
const DespachoImprimir = document.getElementById('LiciURBANImprimir');
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
const byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
const blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
const url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
</script>
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user