2015-12-03 25 views
0

我們在DocuSign中有多個模板,每個模板都帶有單個文檔。爲此,我們在應用程序中設計了一個界面,列出了所有模板。在發送選定的模板(和文檔)之前,是否可以從模板(不是頁面圖像)預覽文檔?使用REST API從模板預覽文檔

注:已使用RESTFul API。

回答

0

使用 '/袋/ {} templateid /文件/ {documentid}' REST API調用以獲取響應,然後在打印響應以在瀏覽器中預覽之前設置標題。

例如:

header('Content-type: application/pdf'); 
header('Content-Disposition: inline; filename="xyz.pdf"'); 
header('Content-Transfer-Encoding: binary'); 
header('Accept-Ranges: bytes'); 
print_r($response);//Print the response form the REST API.