Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

996
Vistas
window.print in Blazor WASM

I'm new to Blazor and I've been trying to find if there's any window.print() equivalent in Blazor. I wonder if there is any pre-made component/helper for this or do I need to create one from scratch? I've already searched enough and can't find any.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

There is no equivalent in blazor but you should consider adding a javascript file with a method with window.print(), reference it in index.html and call it with injected IJSRuntime.

Reference in index.html

<script src="js/script.js"></script>

Javascript file

function printInvoke() {
    window.print();
}

Example in component


@page "/print"
@inject IJSRuntime Js

<h3>PrintTest</h3>

<button @onclick="Print"></button>

@code {
    private async Task Print()
    {
        await Js.InvokeVoidAsync("printInvoke");
    }
}

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda