Skip to content

Commit 994018f

Browse files
author
Kirill Novinskiy
committed
update to 25.8.0
1 parent d759a7b commit 994018f

File tree

6 files changed

+242
-9
lines changed

6 files changed

+242
-9
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
2929
## Read PDF Formats
3030
MHT, PCL, PS, XSLFO, MD
3131

32-
## Enhancements in Version 25.7
33-
- Add possibility to hide subject field in signature appearance.
32+
## Enhancements in Version 25.8
33+
- Implement document page resize functionality using the Pdf.Cloud API library.
3434
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3535

36-
## Bugs fixed in Version 25.7
37-
- PostDeleteStamps removing stamps from PDF page is incorrect.
36+
## Bugs fixed in Version 25.8
37+
- Implement delete watermark from PDF document using the Pdf.Cloud API library.
3838

3939
## Requirements
4040
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
@@ -61,7 +61,7 @@ Add this dependency to your project's POM:
6161
<dependency>
6262
<groupId>com.aspose</groupId>
6363
<artifactId>aspose-pdf-cloud-android</artifactId>
64-
<version>25.7.0</version>
64+
<version>25.8.0</version>
6565
<scope>compile</scope>
6666
</dependency>
6767
```
@@ -70,7 +70,7 @@ Add this dependency to your project's POM:
7070
Add this dependency to your project's build file:
7171

7272
```groovy
73-
compile "com.aspose:aspose-pdf-cloud-android:25.7.0"
73+
compile "com.aspose:aspose-pdf-cloud-android:25.8.0"
7474
```
7575

7676
### Others
@@ -80,7 +80,7 @@ At first generate the JAR by executing:
8080

8181
Then manually install the following JARs:
8282

83-
* target/aspose-pdf-cloud-android-25.7.0.jar
83+
* target/aspose-pdf-cloud-android-25.8.0.jar
8484
* target/lib/*.jar
8585

8686
## Getting Started

sdk/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ apply plugin: 'idea'
2020
apply plugin: 'eclipse'
2121

2222
group = 'com.aspose'
23-
version = '25.7.0'
23+
version = '25.8.0'
2424

2525
buildscript {
2626
repositories {

sdk/docs/PdfApi.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Method | HTTP request | Description
212212
[**postDocumentImageStamps**](PdfApi.md#postDocumentImageStamps) | **POST** /pdf/\{name}/stamps/image | Add document pages image stamps.
213213
[**postDocumentImageStampsPageSpecified**](PdfApi.md#postDocumentImageStampsPageSpecified) | **POST** /pdf/\{name}/stamps/image/pagespecified | Add document image stamps to specified pages.
214214
[**postDocumentPageNumberStamps**](PdfApi.md#postDocumentPageNumberStamps) | **POST** /pdf/\{name}/stamps/pagenumber | Add document page number stamps.
215+
[**postDocumentPagesResize**](PdfApi.md#postDocumentPagesResize) | **POST** /pdf/\{name}/resize | Rsize PDF document.
215216
[**postDocumentPagesRotate**](PdfApi.md#postDocumentPagesRotate) | **POST** /pdf/\{name}/rotate | Rotate PDF document.
216217
[**postDocumentTextFooter**](PdfApi.md#postDocumentTextFooter) | **POST** /pdf/\{name}/footer/text | Add document text footer.
217218
[**postDocumentTextHeader**](PdfApi.md#postDocumentTextHeader) | **POST** /pdf/\{name}/header/text | Add document text header.
@@ -5448,6 +5449,33 @@ Name | Type | Description | Notes
54485449

54495450
[**AsposeResponse**](AsposeResponse.md)
54505451

5452+
### HTTP request headers
5453+
5454+
- **Content-Type**: application/json
5455+
- **Accept**: application/json
5456+
5457+
<a name="postDocumentPagesResize"></a>
5458+
# **postDocumentPagesResize**
5459+
> AsposeResponse postDocumentPagesResize(name, height, width, pages, storage, folder, password)
5460+
5461+
Rsize PDF document.
5462+
5463+
### Parameters
5464+
5465+
Name | Type | Description | Notes
5466+
------------- | ------------- | ------------- | -------------
5467+
**name** | **String**| The document name. |
5468+
**height** | **Double**| Page Height |
5469+
**width** | **Double**| Page width |
5470+
**pages** | **String**| Comma separated list of pages and page ranges. (Example: 1,3-5,8) |
5471+
**storage** | **String**| The document storage. | [optional]
5472+
**folder** | **String**| The document folder. | [optional]
5473+
**password** | **String**| Base64 encoded password. | [optional]
5474+
5475+
### Return type
5476+
5477+
[**AsposeResponse**](AsposeResponse.md)
5478+
54515479
### HTTP request headers
54525480

54535481
- **Content-Type**: application/json

sdk/src/main/java/com/aspose/asposecloudpdfandroid/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public ApiClient() {
9494

9595
// Add custom headers
9696
addDefaultHeader("x-aspose-client", "android sdk");
97-
addDefaultHeader("x-aspose-client-version", "25.7.0");
97+
addDefaultHeader("x-aspose-client-version", "25.8.0");
9898

9999
// PDFCLOUD-418 Set default Connect Timeout
100100
setConnectTimeout(5 * 60 * 1000);

sdk/src/main/java/com/aspose/asposecloudpdfandroid/api/PdfApi.java

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33261,6 +33261,193 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
3326133261
apiClient.executeAsync(call, localVarReturnType, callback);
3326233262
return call;
3326333263
}
33264+
/**
33265+
* Build call for postDocumentPagesResize
33266+
* @param name The document name. (required)
33267+
* @param height Page Height (required)
33268+
* @param width Page width (required)
33269+
* @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33270+
* @param storage The document storage. (optional)
33271+
* @param folder The document folder. (optional)
33272+
* @param password Base64 encoded password. (optional)
33273+
* @param progressListener Progress listener
33274+
* @param progressRequestListener Progress request listener
33275+
* @return Call to execute
33276+
* @throws ApiException If fail to serialize the request body object
33277+
*/
33278+
public com.squareup.okhttp.Call postDocumentPagesResizeCall(String name, Double height, Double width, String pages, String storage, String folder, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
33279+
Object localVarPostBody = null;
33280+
33281+
// create path and map variables
33282+
String localVarPath = "/pdf/{name}/resize"
33283+
.replaceAll("\\{" + "name" + "\\}", apiClient.escapePathSegmentString(name.toString()));
33284+
33285+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
33286+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
33287+
if (height != null)
33288+
localVarQueryParams.addAll(apiClient.parameterToPair("height", height));
33289+
if (width != null)
33290+
localVarQueryParams.addAll(apiClient.parameterToPair("width", width));
33291+
if (pages != null)
33292+
localVarQueryParams.addAll(apiClient.parameterToPair("pages", pages));
33293+
if (storage != null)
33294+
localVarQueryParams.addAll(apiClient.parameterToPair("storage", storage));
33295+
if (folder != null)
33296+
localVarQueryParams.addAll(apiClient.parameterToPair("folder", folder));
33297+
if (password != null)
33298+
localVarQueryParams.addAll(apiClient.parameterToPair("password", password));
33299+
33300+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
33301+
33302+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
33303+
33304+
final String[] localVarAccepts = {
33305+
"application/json"
33306+
};
33307+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
33308+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
33309+
33310+
final String[] localVarContentTypes = {
33311+
"application/json"
33312+
};
33313+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
33314+
localVarHeaderParams.put("Content-Type", localVarContentType);
33315+
33316+
if(progressListener != null) {
33317+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
33318+
@Override
33319+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
33320+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
33321+
return originalResponse.newBuilder()
33322+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
33323+
.build();
33324+
}
33325+
});
33326+
}
33327+
33328+
String[] localVarAuthNames = new String[] { "JWT" };
33329+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
33330+
}
33331+
33332+
@SuppressWarnings("rawtypes")
33333+
private com.squareup.okhttp.Call postDocumentPagesResizeValidateBeforeCall(String name, Double height, Double width, String pages, String storage, String folder, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
33334+
33335+
// verify the required parameter 'name' is set
33336+
if (name == null) {
33337+
throw new ApiException("Missing the required parameter 'name' when calling postDocumentPagesResize(Async)");
33338+
}
33339+
33340+
// verify the required parameter 'height' is set
33341+
if (height == null) {
33342+
throw new ApiException("Missing the required parameter 'height' when calling postDocumentPagesResize(Async)");
33343+
}
33344+
33345+
// verify the required parameter 'width' is set
33346+
if (width == null) {
33347+
throw new ApiException("Missing the required parameter 'width' when calling postDocumentPagesResize(Async)");
33348+
}
33349+
33350+
// verify the required parameter 'pages' is set
33351+
if (pages == null) {
33352+
throw new ApiException("Missing the required parameter 'pages' when calling postDocumentPagesResize(Async)");
33353+
}
33354+
33355+
33356+
com.squareup.okhttp.Call call = postDocumentPagesResizeCall(name, height, width, pages, storage, folder, password, progressListener, progressRequestListener);
33357+
return call;
33358+
33359+
}
33360+
33361+
/**
33362+
* Rsize PDF document.
33363+
*
33364+
* @param name The document name. (required)
33365+
* @param height Page Height (required)
33366+
* @param width Page width (required)
33367+
* @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33368+
* @param storage The document storage. (optional)
33369+
* @param folder The document folder. (optional)
33370+
* @param password Base64 encoded password. (optional)
33371+
* @return AsposeResponse
33372+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
33373+
*/
33374+
public AsposeResponse postDocumentPagesResize(String name, Double height, Double width, String pages, String storage, String folder, String password) throws ApiException {
33375+
try
33376+
{
33377+
ApiResponse<AsposeResponse> resp = postDocumentPagesResizeWithHttpInfo(name, height, width, pages, storage, folder, password);
33378+
return resp.getData();
33379+
}
33380+
catch (ApiException ex)
33381+
{
33382+
if (ex.getCode() == 401)
33383+
{
33384+
apiClient.requestToken();
33385+
ApiResponse<AsposeResponse> resp = postDocumentPagesResizeWithHttpInfo(name, height, width, pages, storage, folder, password);
33386+
return resp.getData();
33387+
}
33388+
throw ex;
33389+
}
33390+
}
33391+
33392+
/**
33393+
* Rsize PDF document.
33394+
*
33395+
* @param name The document name. (required)
33396+
* @param height Page Height (required)
33397+
* @param width Page width (required)
33398+
* @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33399+
* @param storage The document storage. (optional)
33400+
* @param folder The document folder. (optional)
33401+
* @param password Base64 encoded password. (optional)
33402+
* @return ApiResponse&lt;AsposeResponse&gt;
33403+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
33404+
*/
33405+
public ApiResponse<AsposeResponse> postDocumentPagesResizeWithHttpInfo(String name, Double height, Double width, String pages, String storage, String folder, String password) throws ApiException {
33406+
com.squareup.okhttp.Call call = postDocumentPagesResizeValidateBeforeCall(name, height, width, pages, storage, folder, password, null, null);
33407+
Type localVarReturnType = new TypeToken<AsposeResponse>(){}.getType();
33408+
return apiClient.execute(call, localVarReturnType);
33409+
}
33410+
33411+
/**
33412+
* Rsize PDF document. (asynchronously)
33413+
*
33414+
* @param name The document name. (required)
33415+
* @param height Page Height (required)
33416+
* @param width Page width (required)
33417+
* @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8) (required)
33418+
* @param storage The document storage. (optional)
33419+
* @param folder The document folder. (optional)
33420+
* @param password Base64 encoded password. (optional)
33421+
* @param callback The callback to be executed when the API call finishes
33422+
* @return The request call
33423+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
33424+
*/
33425+
public com.squareup.okhttp.Call postDocumentPagesResizeAsync(String name, Double height, Double width, String pages, String storage, String folder, String password, final ApiCallback<AsposeResponse> callback) throws ApiException {
33426+
33427+
ProgressResponseBody.ProgressListener progressListener = null;
33428+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
33429+
33430+
if (callback != null) {
33431+
progressListener = new ProgressResponseBody.ProgressListener() {
33432+
@Override
33433+
public void update(long bytesRead, long contentLength, boolean done) {
33434+
callback.onDownloadProgress(bytesRead, contentLength, done);
33435+
}
33436+
};
33437+
33438+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
33439+
@Override
33440+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
33441+
callback.onUploadProgress(bytesWritten, contentLength, done);
33442+
}
33443+
};
33444+
}
33445+
33446+
com.squareup.okhttp.Call call = postDocumentPagesResizeValidateBeforeCall(name, height, width, pages, storage, folder, password, progressListener, progressRequestListener);
33447+
Type localVarReturnType = new TypeToken<AsposeResponse>(){}.getType();
33448+
apiClient.executeAsync(call, localVarReturnType, callback);
33449+
return call;
33450+
}
3326433451
/**
3326533452
* Build call for postDocumentPagesRotate
3326633453
* @param name The document name. (required)

sdk/src/test/java/com/aspose/asposecloudpdfandroid/api/DocumentTests.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,22 @@ public void postDocumentPagesRotateTest() throws ApiException
320320
AsposeResponse response = th.pdfApi.postDocumentPagesRotate(name, Rotation.ON90.toString(), "2-3", null, folder, null);
321321
assertEquals(200, (int)response.getCode());
322322
}
323+
324+
/**
325+
* PostDocumentPagesResize Test
326+
* @throws ApiException
327+
* if the Api call fails
328+
*/
329+
330+
@Test
331+
public void postDocumentPagesResizeTest() throws ApiException
332+
{
333+
String name = "4pages.pdf";
334+
th.uploadFile(name);
335+
336+
String folder = th.tempFolder;
337+
338+
AsposeResponse response = th.pdfApi.postDocumentPagesResize(name, 100., 200., "2-3", null, folder, null);
339+
assertEquals(200, (int)response.getCode());
340+
}
323341
}

0 commit comments

Comments
 (0)