【问题标题】:Text based redaction in ColdFusion 2016?ColdFusion 2016 中基于文本的编辑?
【发布时间】:2017-02-08 05:54:15
【问题描述】:

ColdFusion 中有没有一种基于文本的编辑方法?我可以单独查看基于坐标的文档。用于基于坐标的编辑的代码是:

<cfpdf action="redact" source="#sourcefile#" destination="#destinationfile#" overwrite="true">
    <cfpdfparam pages="1-2" coordinates="0,0,0,0">
</cfpdf>

基于文本的编辑是否也有类似的方法?

【问题讨论】:

    标签: coldfusion coldfusion-2016


    【解决方案1】:

    事实上,现在在 ColdFusion 中提供了编辑文本的选项。它没有记录,因为该功能仍在进行中,但它确实适用于大多数情况。 为此支持添加了一些新属性。

    1. 您要编辑的单词必须以数组形式给出,属性名称为“wordstoredact”
    2. cfpdfparam 中有一个新属性,即wordmatchingcriteria,其值为:

      • MATCHPARTIALWORD_MARKPARTIALWORD (匹配部分单词,并编辑它们)
      • MATCHPARTIALWORD_MARKWHOLEWORD(匹配部分单词,但编辑整个单词)
      • MARKWHOLEWORD(仅匹配和编辑整个单词)。

    一个例子如下所示:

    cfpdf(action="redact", source="#sourcefile#", destination="#destinationfile#", overwrite=true){
        cfpdfparam(wordstoredact=["Windo", "disclaim"], ignorecase=true, pages="1", wordmatchingcriteria="MATCHPARTIALWORD_MARKPARTIALWORD" );
        cfpdfparam(wordstoredact=["http://", "2010"], ignorecase=true, pages="1", wordmatchingcriteria="MATCHPARTIALWORD_MARKWHOLEWORD" );
        cfpdfparam(wordstoredact=["December", "Resources"], ignorecase=true, pages="2", wordmatchingcriteria="MARKWHOLEWORD" );
        cfpdfparam(wordstoredact=["Tutorial", "definitions"], ignorecase=false, pages="3", wordmatchingcriteria="MATCHPARTIALWORD_MARKWHOLEWORD" );
    };
    

    如果您对 ColdFusion 中基于文本的编辑有任何困惑或任何疑问,请回复

    【讨论】:

    • 谢谢,会试试的!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多