Aar*_*ron 5 java pdf coldfusion
我正在使用ColdFusion 11和Java(com.lowagie.text.pdf.PdfStamper)来填写pdf,但是当我输入一个带有单个撇号的值时,32'它只会保存在pdf 32而不是32'.该值将进入PDF中的多行文本区域.我已尝试启用和不启用富文本.
我试着更换'有';,'',',和\u0027;,但他们都消失了.我也尝试了,xmlFormat但它显示为'.
’从MS Word 复制和粘贴不能作为替换值.
这是我正在使用的代码
this.pdfFile = this.pdfService.read( source=infile );
this.pdfReader = createObject("java","com.lowagie.text.pdf.PdfReader").init( tobinary( this.pdffile ) );
this.pdfWriter = createObject( "java", "java.io.FileOutputStream").init( CreateObject( "java", "java.io.File" ).init( this.outfile ));
this.pdfStamper = createObject( "java", "com.lowagie.text.pdf.PdfStamper").init( this.pdfReader, this.PdfWriter );
this.acroForm = this.pdfStamper.getAcroFields();
//this.misc.text = replace( this.misc.text, "'", "&##39;", "all");
//this.misc.text = replace( this.misc.text, "'", "\u0027;", "all");
//this.misc.text = replace( this.misc.text, "'", "’", "all");
//this.misc.text = replace( this.misc.text, "'", "'", "all");
//this.misc.text = PreserveSingleQuotes( this.misc.text );
this.acroForm.setField("text", this.misc.text );
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
122 次 |
| 最近记录: |