反饋已提交
網絡繁忙
使用匯出API匯出檔案時,如果報表的文字內容中包含特殊的角標,例如下圖所示的化學符號角標:
由於後台 API 不支援匯出角標,匯出後,角標的效果跟預覽的效果不一致,如下圖所示:
可以利用匯出 URL API將檔案匯出到 JVM 記憶體裏面,然後從記憶體中利用位元組匯出流寫出到作業系統指定盤符。
注:Web工程也可以呼叫效能插件的 PDF 列印方法顯示角標,但是實現方式與文檔中提供的程式碼不一樣。程式碼不需要額外寫 startModule,否則插件效果不會生效。
package com.fr.io;import java.io.BufferedInputStream;import java.io.File;import java.io.FileOutputStream;import java.io.IOException;import java.net.MalformedURLException;import java.net.URL;import java.net.URLConnection;public class testUrl { public static void main(String[] args){ String pdfPath = "D:"+File.separator+"TEST.pdf"; try { URL url = new URL("http://localhost:8020/FR10/decision/view/report?viewlet=WorkBook48.cpt&format=pdf&aa=9"); URLConnection connection = url.openConnection(); BufferedInputStream bis = new BufferedInputStream(connection.getInputStream()); FileOutputStream outputStream = new FileOutputStream(new File(pdfPath)); byte[] buff = new byte[1024]; int byteRead; while (-1!=(byteRead=bis.read(buff,0,buff.length))){ outputStream.write(buff,0,byteRead); } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }}
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
反馈已提交
网络繁忙