Hello,
I'm using PDF Viewer to load a byte[] from my file
file info : 28 pages
size : 3,4MB
It takes almost 20 seconds to load my pdf... theres an option to optimize this?
Code:
@if (arquivopdf != null)
{
<div class="mt-n7">
<TelerikPdfViewer @ref="@PdfViewerRef"
Width="100%"
Height="800px"
Data="arquivopdf">
<PdfViewerToolBar>
<PdfViewerToolBarZoomTool />
<PdfViewerToolBarCustomTool>
<MudIconButton Icon="@Icons.Material.Filled.Download" Size="Size.Small" Color="Color.Dark" OnClick="BaixarArquivo" Style="@ocultarImprimir" />
</PdfViewerToolBarCustomTool>
<PdfViewerToolBarCustomTool>
<MudIconButton Icon="@Icons.Material.Filled.MobileScreenShare" Size="Size.Small" Color="Color.Dark" OnClick="() => AbrirEncaminhar()" Style="@ocultarEncaminhar" />
</PdfViewerToolBarCustomTool>
<PdfViewerToolBarCustomTool>
<MudIconButton Icon="@Icons.Material.Filled.ArrowBack" Disabled="@disableAnterior" Size="Size.Small" Color="Color.Dark" Style="@ocultarBtnAnterior" OnClick="() => CarregarAnterior()" />
</PdfViewerToolBarCustomTool>
<PdfViewerToolBarCustomTool>
<MudIconButton Icon="@Icons.Material.Filled.ArrowForward" Disabled="@disableProximo" Size="Size.Small" Color="Color.Dark" Style="@ocultarBtnProximo" OnClick="() => CarregarProximo()" />
</PdfViewerToolBarCustomTool>
<PdfViewerToolBarCustomTool>
<MudIconButton Icon="@Icons.Material.Filled.Close" Size="Size.Small" Color="Color.Dark" OnClick="()=> Cancel()" />
</PdfViewerToolBarCustomTool>
</PdfViewerToolBar>
</TelerikPdfViewer>
</div>
}
{
_relatorio = await _RelatorioService.ObterRelatorioPorId(Id);
arquivopdf = _relatorio.Arquivo;
}