原創(chuàng)|其它|編輯:郝浩|2012-10-23 11:03:28.000|閱讀 265 次
概述:Aspose.Pdf中的CreateApplicationLink可以讓你在PDF文件中添加一個(gè)鏈接,它可以用來(lái)啟動(dòng)外部應(yīng)用程序。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Pdf中的CreateApplicationLink可以讓你在PDF文件中添加一個(gè)鏈接,它可以用來(lái)啟動(dòng)外部應(yīng)用程序。例如,在下面的代碼中,我們將創(chuàng)建一個(gè)鏈接到一個(gè)文本文件。當(dāng)你點(diǎn)擊輸出的PDF文件中的鏈接時(shí),它將在你的電腦上使用文本編輯器打開文本文件。
代碼來(lái)了:
[C#]
//open document PdfContentEditor contentEditor = new PdfContentEditor(); contentEditor.BindPdf("input.pdf"); System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(100,100,200,200); //create application link contentEditor.CreateApplicationLink(rectangle, "test.txt", 1); //save updated PDF contentEditor.Save("output.pdf");
[VB.NET]
'open document Dim contentEditor As New PdfContentEditor() contentEditor.BindPdf("input.pdf") Dim rectangle As New System.Drawing.Rectangle(100,100,200,200) 'create application link contentEditor.CreateApplicationLink(rectangle, "test.txt", 1) 'save updated PDF contentEditor.Save("output.pdf")
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)