<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-watermark-cloud</artifactId>
<version>22.3</version>
</dependency>compile(group: 'com.groupdocs', name: 'groupdocs-watermark-cloud', version: '22.3')<dependency org="com.groupdocs" name="groupdocs-watermark-cloud" rev="22.3">
<artifact name="groupdocs-watermark-cloud" ext="jar"/>
</dependency>libraryDependencies += "com.groupdocs" % "groupdocs-watermark-cloud" % "22.3"ドキュメント透かし Java Cloud REST API
Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | {{ハイパーリンク8}}
GroupDocs.Watermark Cloud SDK for Java は、サードパーティ ソフトウェアをインストールしなくても動作するクラウド ドキュメント透かし Java アプリの構築を支援します。 GroupDocs.Watermark Cloud REST APIs のラッパーです。
要件
API クライアント ライブラリを構築するには、次のものが必要です。
- Java 1.7+
- メイヴン
前提条件
GroupDocs.Watermark Cloud SDK for Java を使用するには、GroupDocs Cloud でアカウントを登録し、Cloud Dashboard でクライアント ID とクライアント シークレットを検索/作成する必要があります。無料枠あります。詳細については、GroupDocs Cloud Pricing を参照してください。
Maven から GroupDocs.Watermark-Cloud をインストールします
GroupDocs Cloud リポジトリをアプリケーションの pom.xml に追加します
<repository>
<id>repository.groupdocs.cloud</id>
<name>repository.groupdocs.cloud</name>
<url>https://releases.groupdocs.cloud/java/repo/</url>
</repository>
ソースからインストール
API クライアント ライブラリをローカルの Maven リポジトリにインストールするには、次のコマンドを実行するだけです。
mvn clean install
代わりにリモートの Maven リポジトリにデプロイするには、リポジトリの設定を構成し、次を実行します。
mvn clean deploy
詳細については、OSSRH Guide を参照してください。
Maven ユーザー
この依存関係をプロジェクトの POM に追加します。
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-watermark-cloud</artifactId>
<version>22.3</version>
<type>pom</type>
</dependency>
その他
最初に、次を実行して JAR を生成します。
mvn clean package
次に、次の JAR を手動でインストールします。
target/groupdocs-watermark-cloud-22.3.jartarget/lib/*.jar
始めましょう
Quick Startの指示に従ってください。
Java Cloud SDK を介して「DOCX」にテキスト透かしを追加する
// For complete examples and data files, please go to https://github.com/groupdocs-parser-cloud/groupdocs-parser-cloud-java-samples
String MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
String MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
Configuration configuration = new Configuration(MyAppSid, MyAppKey);
WatermarkApi apiInstance = new WatermarkApi(configuration);
WatermarkOptions options = new WatermarkOptions();
FileInfo fileInfo = new FileInfo();
fileInfo.setFilePath("documents/sample.docx");
options.setFileInfo(fileInfo);
WatermarkDetails watermarkDetails = new WatermarkDetails();
TextWatermarkOptions textWatermarkOptions = new TextWatermarkOptions();
textWatermarkOptions.setText("New watermark text");
textWatermarkOptions.setFontFamilyName("Arial");
textWatermarkOptions.setFontSize(12d);
watermarkDetails.setTextWatermarkOptions(textWatermarkOptions);
List<WatermarkDetails> watermarkDetailsList = new ArrayList<WatermarkDetails>();
watermarkDetailsList.add(watermarkDetails);
options.setWatermarkDetails(watermarkDetailsList);
AddRequest request = new AddRequest(options);
WatermarkResult response = apiInstance.add(request);
承認と認証
API 用に定義された Authentication schemes は次のとおりです。
JWT
- タイプ: OAuth 2.0
- フロー: アプリケーション
- 認証 URL:https://api.groupdocs.cloud/connect/token
- トークンの有効期間: 1 日 (デフォルト)
Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | {{ハイパーリンク8}}
GroupDocs Java REST API Maven SDK Java SDK Cloud REST REST API Cloud API MIT JWT oauth GroupDocs.Total Cloud GroupDocs.Watermark Cloud JAR document automation document automation cloud document DOC DOCX DOCM DOT DOTM DOTX RTF ODT XLS XLT XLSX XLSM XLTX XLTM PPT PPTX PPTM PPS PPSX PPSM POTX POTM VSD VDX VSDX VSTX VSS VSSX VSDM VSSM VSTM VTX VSX BMP GIF JPG JPEG JPE JP2 PNG TIFF WEBP PDF watermark text image text watermark image watermark positioning dimension rotation foreground background search filter styling formatting alignment

