Skip to content

Commit 7652927

Browse files
authored
doc(Html2Pdf): add PdfOptions documentation (#7038)
* doc: 增加检查依赖缺失命令 * doc: 更新注释文档 * doc: 增加 PdfOptions 说明 * chore: bump versiopn 9.12.0
1 parent eea9569 commit 7652927

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,25 @@ sudo apt install ./google-chrome-stable_current_amd64.deb</Pre>
4949
<li>检查是否有依赖缺失</li>
5050
</ul>
5151

52+
<p>通过下面命令检查依赖缺失情况</p>
53+
54+
<Pre>ldd chrome | grep not</Pre>
55+
5256
<p class="code-quest">4. 部署后是否会反复下载 Chrome 安装包</p>
5357
<p class="code-answer">不会,Html2Pdf 会检查是否存在安装目录安装成功后即不会重复下载安装操作</p>
5458

59+
<Tips>
60+
<p>可以通过 <code>PdfOptions</code> 配置类设置导出 <code>Pdf</code> 一些相关设置</p>
61+
<ul class="ul-demo" style="margin-bottom: 0;">
62+
<li><code>Landscape</code> 是否横向打印 默认 false</li>
63+
<li><code>PrintBackground</code> 是否打印背景色 默认 false</li>
64+
<li><code>Format</code> 纸张格式 默认 A4</li>
65+
<li><code>DisplayHeaderFooter</code> 是否显示页眉页脚 默认 false</li>
66+
<li><code>Scale</code> 放大比例 默认 1 取值 0.1 到 2 之间</li>
67+
<li><code>MarginOptions</code> 页面边距 默认 none</li>
68+
</ul>
69+
</Tips>
70+
5571
<DemoBlock Title="@Localizer["Html2PdfElementTitle"]" Introduction="@Localizer["Html2PdfElementIntro"]" Name="Normal">
5672
<section ignore>
5773
<p>@((MarkupString)Localizer["Html2PdfElementDesc"].Value)</p>

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
4-
<Version>9.11.5-beta11</Version>
4+
<Version>9.12.0</Version>
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(VisualStudioVersion)' == '18.0'">
8-
<Version>10.0.0-rc.2.1.10</Version>
8+
<Version>10.0.0-rc.2.2.0</Version>
99
</PropertyGroup>
1010

1111
<ItemGroup>

src/BootstrapBlazor/Options/PdfOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class PdfOptions
3636
public decimal Scale { get; set; } = 1;
3737

3838
/// <summary>
39-
/// 获得/设置 页面边距 默认 none
39+
/// 获得/设置 页面边距 默认 未设置
4040
/// </summary>
4141
public MarginOptions MarginOptions { get; set; } = new();
4242
}

0 commit comments

Comments
 (0)