1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      Java怎么在PDF中添加注釋

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

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

      流程

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

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

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

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

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

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

      實(shí)例

      // 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í)后,相信大家對(duì)Java怎么在PDF中添加注釋這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!


      本文標(biāo)題:Java怎么在PDF中添加注釋
      本文URL:http://www.ef60e0e.cn/article/jiecse.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        湟源县| 炎陵县| 司法| 正安县| 邵阳县| 铅山县| 静乐县| 奉新县| 贺兰县| 平远县| 麻栗坡县| 辽宁省| 喜德县| 盐边县| 临潭县| 松阳县| 阳城县| 新郑市| 武陟县| 德令哈市| 林西县| 临江市| 钦州市| 陆河县| 沅江市| 陆良县| 梧州市| 崇礼县| 渝中区| 高陵县| 密云县| 来安县| 霍山县| 会同县| 山西省| 莆田市| 延边| 永嘉县| 张家川| 盈江县| 广德县|