内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

Java怎么在PDF中添加注釋

這篇文章主要講解了“Java怎么在PDF中添加注釋”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Java怎么在PDF中添加注釋”吧!

從化ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:13518219792(備注:SSL證書合作)期待與您的合作!

流程

1、使用Document類加載PDF文檔。

2、創(chuàng)建TextAnnotation對象,添加文本注釋。

3、設(shè)定標(biāo)題、主題等注釋屬性。

4、使用Border類設(shè)置注釋的Border。

使用Document.getPages().get_Item(int).getAnnotations().add(Annotation)方法向文檔添加注釋。

5、用Document.save保存更新的PDF。

實例

// Open the source PDF document
Document pdfDocument = new Document("input.pdf");
 
// Create annotation
TextAnnotation textAnnotation = new TextAnnotation(pdfDocument.getPages().get_Item(1), new com.aspose.pdf.Rectangle(200, 400, 400, 600));
 
// Set annotation title
textAnnotation.setTitle("Sample Annotation Title");
 
// Set annotation subject
textAnnotation.setSubject("Sample Subject");
textAnnotation.setState(AnnotationState.Accepted);
 
// Specify the annotation contents
textAnnotation.setContents("Sample contents for the annotation");
textAnnotation.setOpen(true);
textAnnotation.setIcon(TextIcon.Key);
Border border = new Border(textAnnotation);
border.setWidth(5);
border.setDash(new Dash(1, 1));
textAnnotation.setBorder(border);
textAnnotation.setRect(new com.aspose.pdf.Rectangle(200, 400, 400, 600));
 
// Add annotation in the annotations collection of the page
pdfDocument.getPages().get_Item(1).getAnnotations().add(textAnnotation);
 
// Save the output file
pdfDocument.save("output.pdf");

感謝各位的閱讀,以上就是“Java怎么在PDF中添加注釋”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對Java怎么在PDF中添加注釋這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識點的文章,歡迎關(guān)注!

當(dāng)前名稱:Java怎么在PDF中添加注釋
文章位置:http://www.rwnh.cn/article34/jiecse.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導(dǎo)航、域名注冊軟件開發(fā)、標(biāo)簽優(yōu)化網(wǎng)站內(nèi)鏈、網(wǎng)站設(shè)計公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)頁設(shè)計公司
治多县| 平山县| 古交市| 会宁县| 咸阳市| 巨野县| 抚宁县| 平塘县| 金沙县| 手机| 枣庄市| 余姚市| 苍南县| 清河县| 永平县| 花垣县| 新蔡县| 双桥区| 买车| 泗阳县| 宾川县| 庄浪县| 松原市| 四平市| 津南区| 广宁县| 新巴尔虎左旗| 天峨县| 红河县| 巩留县| 宜春市| 长子县| 名山县| 三门峡市| 华亭县| 莱州市| 南乐县| 开鲁县| 西贡区| 东辽县| 蕉岭县|