Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,25 @@ sudo apt install ./google-chrome-stable_current_amd64.deb</Pre>
<li>检查是否有依赖缺失</li>
</ul>

<p>通过下面命令检查依赖缺失情况</p>

<Pre>ldd chrome | grep not</Pre>
Comment on lines +52 to +54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider clarifying the 'chrome' binary path for ldd command.

Specifying the full path to the 'chrome' binary (e.g., '/usr/bin/google-chrome-stable') will help users locate it and ensure the command works reliably.

Suggested change
<p>通过下面命令检查依赖缺失情况</p>
<Pre>ldd chrome | grep not</Pre>
<p>通过下面命令检查依赖缺失情况(请根据实际安装路径调整 chrome 二进制文件路径)</p>
<Pre>ldd /usr/bin/google-chrome-stable | grep not</Pre>


<p class="code-quest">4. 部署后是否会反复下载 Chrome 安装包</p>
<p class="code-answer">不会,Html2Pdf 会检查是否存在安装目录安装成功后即不会重复下载安装操作</p>

<Tips>
<p>可以通过 <code>PdfOptions</code> 配置类设置导出 <code>Pdf</code> 一些相关设置</p>
<ul class="ul-demo" style="margin-bottom: 0;">
<li><code>Landscape</code> 是否横向打印 默认 false</li>
<li><code>PrintBackground</code> 是否打印背景色 默认 false</li>
<li><code>Format</code> 纸张格式 默认 A4</li>
<li><code>DisplayHeaderFooter</code> 是否显示页眉页脚 默认 false</li>
<li><code>Scale</code> 放大比例 默认 1 取值 0.1 到 2 之间</li>
<li><code>MarginOptions</code> 页面边距 默认 none</li>
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation still says '默认 none' (default none) but the code comment in PdfOptions.cs was updated to '默认 未设置' (default not set). These should be consistent. Update this line to match the corrected description: '默认 未设置'.

Suggested change
<li><code>MarginOptions</code> 页面边距 默认 none</li>
<li><code>MarginOptions</code> 页面边距 默认 未设置</li>

Copilot uses AI. Check for mistakes.
</ul>
</Tips>

<DemoBlock Title="@Localizer["Html2PdfElementTitle"]" Introduction="@Localizer["Html2PdfElementIntro"]" Name="Normal">
<section ignore>
<p>@((MarkupString)Localizer["Html2PdfElementDesc"].Value)</p>
Expand Down
4 changes: 2 additions & 2 deletions src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
<Version>9.11.5-beta11</Version>
<Version>9.12.0</Version>
</PropertyGroup>

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

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/Options/PdfOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class PdfOptions
public decimal Scale { get; set; } = 1;

/// <summary>
/// 获得/设置 页面边距 默认 none
/// 获得/设置 页面边距 默认 未设置
/// </summary>
public MarginOptions MarginOptions { get; set; } = new();
}
Loading