【问题标题】:itext Sharp and PDF form stamping with parenthesesitext Sharp 和 PDF 表单加括号
【发布时间】:2013-01-22 17:14:44
【问题描述】:

我的 pdf 没有正确显示负数我已经使用 acrobat 设置了一个 pdf 表单,其中包含格式化为数字的 textfeild。

当使用压模通过 itext sharp 填充时,它不会正确显示负数

除非同时勾选 Show Parnetheses 和 use red text

我只需要括号而不是负数样式的红色数字有其他人遇到这个错误吗?

【问题讨论】:

    标签: itextsharp acrobat pdfstamper


    【解决方案1】:

    找不到答案,所以手动编码了括号

    Function fixnegatives(astring As String) As String
        If IsNumeric(astring) Then
            Dim aint As Integer = CInt(astring)
            astring = String.Format("{0:#,###,###}", aint)
            If (aint < 0) Then
                Dim bstring As New StringBuilder(astring)
                bstring.Replace("-", "(")
                bstring.Append(")")
                astring = bstring.ToString()
            End If
        End If
        Return astring
    End Function
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-27
      • 2012-07-09
      • 2014-08-21
      • 2015-12-14
      • 1970-01-01
      相关资源
      最近更新 更多