BootstrapBlazor.PdfReader 0.0.1

Blazor Pdf Reader PDF阅读器 组件

示例:

https://blazor.app1.es/PdfReader

使用方法:

1.nuget包

BootstrapBlazor.PdfReader

2._Imports.razor 文件 或者页面添加 添加组件库引用

@using BootstrapBlazor.Components

3.razor页面

<PdfReader OnFileText="OnFileText" 
            OnFileStream="OnFileStream" 
            OnDirectory="OnDirectory" 
            />

<pre>@contents</pre>

@code{

    private string contents;

    private Task OnFileText(string contents)
    {
        this.contents = contents;
        StateHasChanged();
        return Task.CompletedTask;
    }
    
    private Task OnFileStream(Stream stream)
    {
        //using MiniExcelLibs
        //private string contentsExcel;
        //var rows = stream.Query().ToList();
        //rows.ForEach(a=> contentsExcel += Environment.NewLine + string.Join(" | " , a ));
        StateHasChanged();
        return Task.CompletedTask;
    }
    
    private Task OnDirectory(List<string> dirs)
    {
        if (dirs == null || !dirs.Any()) return Task.CompletedTask;
        contents += "Dir:" + Environment.NewLine;
        contents += dirs.First() + Environment.NewLine;
        foreach (var item in dirs.Skip(1).OrderByDescending(a => a.StartsWith("+")).ThenBy(a => a))
        {
            contents += item + Environment.NewLine;
        }
        StateHasChanged();
        return Task.CompletedTask;
    }


} 

No packages depend on BootstrapBlazor.PdfReader.

Version Downloads Last updated
9.0.1 5 2025/5/26
9.0.0 3 2025/5/26
9.0.0-beta02 1 2025/5/26
9.0.0-beta01 2 2025/5/26
8.0.4 2 2025/5/26
8.0.3 2 2025/5/26
8.0.2 1 2025/5/26
8.0.1 2 2025/5/26
8.0.1-beta2 2 2025/5/26
8.0.1-beta 1 2025/5/26
8.0.0 1 2025/5/27
7.2.0 1 2025/5/26
7.1.11-beta 2 2025/4/17
7.1.10 1 2025/5/26
7.1.9 1 2025/5/26
7.1.8 1 2025/5/26
7.1.7 2 2025/5/26
7.1.5 1 2025/5/26
7.1.4 1 2025/5/26
7.1.3 1 2025/5/26
7.1.2 2 2025/5/26
7.1.1 1 2025/5/27
7.1.0 1 2025/5/26
7.0.8-beta 2 2025/5/26
7.0.7 1 2025/5/26
7.0.6 1 2025/5/26
7.0.5 1 2025/5/27
7.0.4 2 2025/5/26
7.0.3 2 2025/5/26
7.0.2 1 2025/5/26
7.0.1 2 2025/5/26
7.0.0 1 2025/5/26
0.0.1 1 2025/5/27