<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-html-cloud</artifactId>
    <version>20.7.0</version>
</dependency>
copied!  
compile(group: 'com.aspose', name: 'aspose-html-cloud', version: '20.7.0')
copied!  
<dependency org="com.aspose" name="aspose-html-cloud" rev="20.7.0">
    <artifact name="aspose-html-cloud" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.aspose" % "aspose-html-cloud" % "20.7.0"
copied!  

HTML レンダリングと変換 Java Cloud REST API

banner

Product Page | Documentation | Live Demo | Swagger UI | Code Samples | Blog | Free Support | {{ハイパーリンク8}}

Aspose.HTML Cloud SDK for Java は、サードパーティ ソフトウェアをインストールすることなく、クラウドベースの Java アプリ内で 3D ファイル形式を操作するのに役立ちます。 Aspose.HTML Cloud REST APIs のラッパーです。

HTML クラウド処理機能

HTML ファイルのクラウド ストレージ機能

  • バージョン処理を含む、ファイルのアップロード、ダウンロード、コピー、移動、および削除 (この機能をサポートするクラウド ストレージを使用している場合 - デフォルトで true)。
  • フォルダの作成、コピー、移動、および削除。
  • 単一の操作の範囲内で、ファイルとフォルダーを別々のストレージ間でコピーおよび移動します。
  • 特定のファイル、フォルダー、またはストレージが存在するかどうかを確認します。

HTML形式の読み書き

HTML、圧縮された HTML、SVG マークアップを含む HTML
MHTML (Web アーカイブ)
XHTML、圧縮された XHTML
マークダウン (MD)

HTML を名前を付けて保存

Microsoft Word®: DOCX
固定レイアウト: PDF、XPS
画像: TIFF、JPEG、PNG、BMP

HTML 形式の読み取り

電子書籍: EPUB

要件

API クライアント ライブラリを構築するには、次のものが必要です。

  1. Java 1.7+
  2. メイヴン

前提条件

Aspose.HTML Cloud SDK for Java を使用するには、Aspose Cloud でアカウントを登録し、Cloud Dashboard でクライアント ID とクライアント シークレットを検索/作成する必要があります。無料枠あります。詳細については、Aspose Cloud Pricing を参照してください。

インストール

Maven からインストール

Aspose Cloud リポジトリをアプリケーション pom.xml に追加します。

<repository>
	<id>AsposeJavaAPI</id>
	<name>Aspose Java API</name>
	<url>https://releases.aspose.cloud/java/repo/</url>
</repository>

ソースからインストール

API クライアント ライブラリをローカルの Maven リポジトリにインストールするには、次のコマンドを実行するだけです。

mvn clean install

代わりにリモートの Maven リポジトリにデプロイするには、リポジトリの設定を構成し、次を実行します。

mvn clean deploy

詳細については、OSSRH Guide を参照してください。

Maven ユーザー

この依存関係をプロジェクトの POM に追加します。

<dependency>
	<groupId>com.aspose</groupId>
	<artifactId>aspose-html-cloud</artifactId>
	<version>20.7.0</version>
	<scope>compile</scope>
</dependency>

その他

最初に、次を実行して JAR を生成します。

mvn clean package

次に、次の JAR を手動でインストールします。

  • target/aspose-html-cloud-20.7.0.jar
  • target/lib/*.jar

ライセンス

すべての Aspose.HTML Cloud SDK、ヘルパー スクリプト、およびテンプレートは、MIT License の下でライセンスされています。

承認と認証

API 用に定義された Authentication schemes は次のとおりです。

JWT

おすすめ

潜在的な問題を回避するために、マルチスレッド環境でスレッドごとに「ApiClient」のインスタンスを作成することをお勧めします。

JavaでのHTMLからJPGへ

// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).

Configuration.setAPP_SID("MY_CLIENT_ID");
Configuration.setAPI_KEY("MY_CLIENT_SECRET");
Configuration.setBasePath("https://api.aspose.cloud/v3.0");
Configuration.setAuthPath("https://api.aspose.cloud/connect/token");
Configuration.setUserAgent("WebKit");
Configuration.setDebug(true);
Configuration.setTestSrcDir("My_Source_Folder");
Configuration.setTestDstDir("My_Output_Folder");

ConversionApi conversionApi = new ApiClient().createService(ConversionApi.class);

String name = "test.html";// Document name. Place the html document in the folder "testdata".
String outFormat = "jpg"; // Convert to jpg

Integer width = 800; // Resulting image width.
Integer height = 1000; // Resulting image height.
Integer leftMargin = 10; // Left resulting image margin.
Integer rightMargin = 10; // Right resulting image margin.
Integer topMargin = 10; // Top resulting image margin.
Integer bottomMargin = 10; // Bottom resulting image margin.
Integer resolution = 300; // Resolution of resulting image.
String folder = "/"; // The folder in the storage. Should exist.
String storage = "My_Storage_Name"; // Name of the storage. null

// Prepare call execute
Call<ResponseBody> call = conversionApi.GetConvertDocumentToImage(name, outFormat, width, height, leftMargin, rightMargin, topMargin, bottomMargin, resolution, folder, storage);

// Execute request
Response<ResponseBody> img = call.execute();

// Get body from response
ResponseBody answer = img.body();

Product Page | Documentation | Live Demo | Swagger UI | Code Samples | Blog | Free Support | {{ハイパーリンク8}}

VersionRelease Date
22.11.12022年11月8日
22.9.12022年10月12日
20.7.02020年7月23日