-
-
Notifications
You must be signed in to change notification settings - Fork 362
doc(Html2Pdf): add PdfOptions documentation #7038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR enhances the Html2Pdf sample by adding detailed documentation for the PdfOptions configuration and corrects the default description for MarginOptions in the PdfOptions class. Class diagram for updated PdfOptions documentationclassDiagram
class PdfOptions {
bool Landscape
bool PrintBackground
string Format
bool DisplayHeaderFooter
decimal Scale
MarginOptions MarginOptions
}
class MarginOptions
PdfOptions --> MarginOptions
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor:52-54` </location>
<code_context>
+<p>通过下面命令检查依赖缺失情况</p>
+
+<Pre>ldd chrome | grep not</Pre>
+
<p class="code-quest">4. 部署后是否会反复下载 Chrome 安装包</p>
</code_context>
<issue_to_address>
**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.
```suggestion
<p>通过下面命令检查依赖缺失情况(请根据实际安装路径调整 chrome 二进制文件路径)</p>
<Pre>ldd /usr/bin/google-chrome-stable | grep not</Pre>
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| <p>通过下面命令检查依赖缺失情况</p> | ||
|
|
||
| <Pre>ldd chrome | grep not</Pre> |
There was a problem hiding this comment.
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.
| <p>通过下面命令检查依赖缺失情况</p> | |
| <Pre>ldd chrome | grep not</Pre> | |
| <p>通过下面命令检查依赖缺失情况(请根据实际安装路径调整 chrome 二进制文件路径)</p> | |
| <Pre>ldd /usr/bin/google-chrome-stable | grep not</Pre> |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7038 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 743 743
Lines 32475 32475
Branches 4500 4500
=========================================
Hits 32475 32475
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates version numbers and improves documentation for PDF export functionality. The comment describing the default value for MarginOptions is clarified from "none" to "not set" to better reflect that margin properties default to null values.
- Updated project version numbers for VS 17.0 and VS 18.0
- Clarified documentation for
MarginOptionsdefault value - Added comprehensive PdfOptions configuration documentation to the Html2Pdfs sample page
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/BootstrapBlazor/BootstrapBlazor.csproj | Version bumps for both Visual Studio 17.0 (9.12.0) and 18.0 (10.0.0-rc.2.2.0) configurations |
| src/BootstrapBlazor/Options/PdfOptions.cs | Updated Chinese comment to clarify MarginOptions defaults to "not set" instead of "none" |
| src/BootstrapBlazor.Server/Components/Samples/Html2Pdfs.razor | Added Tips section documenting PdfOptions configuration properties and added command for checking Chrome dependency issues |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <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> |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
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: '默认 未设置'.
| <li><code>MarginOptions</code> 页面边距 默认 none</li> | |
| <li><code>MarginOptions</code> 页面边距 默认 未设置</li> |
Link issues
fixes #7037
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add documentation for PdfOptions in HTML2PDF sample and clarify the default margin description
Documentation: