小编Nee*_*raj的帖子

使用iTextSharp在句子中加粗单个单词

是否可以使用iTextSharp在句子中加粗单个单词?我试图加粗几个单词而不必将字符串分成单个短语.

我想要这种类型的输出

例如:取消原因:见本法背面第1号法令指定的法定理由.

我的实际输出低于

例如:取消原因:见本法背面第1号法令指定的法定理由.

    pdftb4 = new PdfPTable(1);
    pdftb4.WidthPercentage = 100;
    width = new float[1];
    width[0] = 0.7F;
    pdftb4.SetWidths(width);

  pdfcel4 = new PdfPCell(new Phrase("\n REASON(S) FOR CANCELLATION: See Statutoryreason(s) designated by Code No(s) 1 on the reverse side hereof", docBlackFont10));
    pdfcel4.Border = 0;
    pdfcel4.HorizontalAlignment = Element.ALIGN_LEFT;
    pdftb4.AddCell(pdfcel4);
   objDocument.Add(pdftb4);
Run Code Online (Sandbox Code Playgroud)

有人请帮帮我

c# itextsharp

21
推荐指数
1
解决办法
4万
查看次数

如何绕过iTextSharp桌边的角?

我想在itextsharp中制作一个圆角矩形.这是我现在没有舍入的输出:

在此输入图像描述

这是我处理输出的代码:

pdftbl = new PdfPTable(3);
pdftbl.WidthPercentage = 100;
width = new float[3];
width[0] = 0.6F;
width[1] = 0.2F;
width[2] = 0.6F;
pdftbl.SetWidths(width);
pdfcel = new PdfPCell(new Phrase(Insuredaddress, docFont9));
pdfcel.BorderColor = Color.BLACK;
pdftbl.AddCell(pdfcel);
pdfcel = new PdfPCell(new Phrase("", docWhiteFont9));
pdfcel.Border = 0;
pdftbl.AddCell(pdfcel);
pdfcel = new PdfPCell(new Phrase(BkrAddrss, docFont9));
pdfcel.BorderColor = Color.BLACK;
pdftbl.AddCell(pdfcel);
objDocument.Add(pdftbl);
Run Code Online (Sandbox Code Playgroud)

我可以更改/添加什么来实现所需的结果?

c# itext

5
推荐指数
1
解决办法
7366
查看次数

如何使用c#获取嵌套网格中的按钮查找控件值

我正在使用嵌套GridViews,其中gridview中的每一行都有子gridView.我正在使用Parent GridView的RowDataBound事件来绑定Child GridView.我的问题是,如何在父gridViews RowDataBound事件中获取Child GridView的Button findcontrol值.

这是我的Aspx页面

         <asp:GridView ID="grdSubClaimOuter" SkinID="GridView" runat="server" Width="100%"
                    AutoGenerateColumns="false" OnRowDataBound="grdSubClaimOuter_RowDataBound" OnRowCommand="grdSubClaimOuter_RowCommand"
                    ShowFooter="false" AllowPaging="true" OnPageIndexChanging="grdSubClaimOuter_PageIndexChanging">
                    <%--<AlternatingRowStyle BackColor="ButtonFace" />--%>
                    <Columns>
                        <asp:TemplateField ItemStyle-Width="5%">
                            <ItemTemplate>
                                <asp:HiddenField ID="hdnClaimNo" runat="server" Value='<%# Eval("ClaimNo") %>' />
                                <asp:Image runat="server" ID="img1" ImageUrl="../images/Collapse_plus.png" />
                            </ItemTemplate>
                            <ItemStyle Width="5%"></ItemStyle>
                        </asp:TemplateField>
              <asp:GridView ID="grdSubClaim" runat="server" SkinID="GridView" CellPadding="4" Width="100%"
                                    AutoGenerateColumns="false" ShowFooter="false" OnRowEditing="grdSubClaim_RowEditing"
                                    OnRowCommand="grdSubClaim_RowCommand" OnRowDeleting="grdSubClaim_RowDeleted" 
                                    AllowPaging="false" >
                                    <%--SkinID="GridView"--%>
                                    <Columns>
                                        <asp:TemplateField FooterStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                            <HeaderTemplate>
                                                Sub Claim No
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblSubClaimNoValue" Width="" runat="server" Text='<%#Eval("SubClaimNo")%>'></asp:Label>
                                            </ItemTemplate>
                                            <FooterStyle HorizontalAlign="Left" />
                                        </asp:TemplateField>
           <asp:Button ID="btnSubrogation" CssClass="groovybutton" runat="server" CommandName="Subrogation" …
Run Code Online (Sandbox Code Playgroud)

c# asp.net gridview

1
推荐指数
1
解决办法
1万
查看次数

如何在c#中更改按钮颜色

我在DataGrid中有很多按钮

我想将Button的颜色设置为绿色而Button.Text变为白色(不是全部,仅适用于1个按钮),基于我的if条件,我使用ITextSharp来创建PDF生成,我评论了iTextSharp头文件,我得到了结果但我必须在我的代码中需要iTextSharp这次发生错误发生.

"无法隐式转换类型iTextSharp.text.Color到System.Drawing.Color"

这是我的iTextSharp头文件

using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.text.html;
Run Code Online (Sandbox Code Playgroud)

这是代码

            if (dsRecAdj.Tables[2].Rows.Count > 0)
                {

                    Button btn = (Button)e.Row.FindControl("btnSalvage");
                    btn.ForeColor = Color.Red;

                }
Run Code Online (Sandbox Code Playgroud)

有些人请帮助我

c# background-color

0
推荐指数
1
解决办法
2万
查看次数

标签 统计

c# ×4

asp.net ×1

background-color ×1

gridview ×1

itext ×1

itextsharp ×1