Skip to content

Commit 8cea58b

Browse files
authored
Merge pull request #79 from aspose-pdf-cloud/develop
update to 24.11
2 parents f983901 + 747991a commit 8cea58b

File tree

11 files changed

+354
-17
lines changed

11 files changed

+354
-17
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,10 @@ 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 24.10
33-
- Develop a method to add XMP metadata.
34-
- Develop a method to obtain XMP metadata in the XML form.
35-
- Develop a method to obtain XMP metadata in the JSON form.
32+
## Enhancements in Version 24.11
33+
- Add DocRecognitionMode EnhancedFlow mode.
3634
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3735

38-
## Bugs fixed in Version 24.10
39-
- PDF XFA form to Acro from conversion API results corrupt PDF.
40-
4136
## Requirements
4237
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
4338

@@ -63,7 +58,7 @@ Add this dependency to your project's POM:
6358
<dependency>
6459
<groupId>com.aspose</groupId>
6560
<artifactId>aspose-pdf-cloud-android</artifactId>
66-
<version>24.10.0</version>
61+
<version>24.11.0</version>
6762
<scope>compile</scope>
6863
</dependency>
6964
```
@@ -72,7 +67,7 @@ Add this dependency to your project's POM:
7267
Add this dependency to your project's build file:
7368

7469
```groovy
75-
compile "com.aspose:aspose-pdf-cloud-android:24.10.0"
70+
compile "com.aspose:aspose-pdf-cloud-android:24.11.0"
7671
```
7772

7873
### Others
@@ -82,7 +77,7 @@ At first generate the JAR by executing:
8277

8378
Then manually install the following JARs:
8479

85-
* target/aspose-pdf-cloud-android-24.10.0.jar
80+
* target/aspose-pdf-cloud-android-24.11.0.jar
8681
* target/lib/*.jar
8782

8883
## Getting Started

sdk/build.gradle

Lines changed: 2 additions & 2 deletions
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 = '24.10.0'
23+
version = '24.11.0'
2424

2525
buildscript {
2626
repositories {
@@ -100,7 +100,7 @@ dependencies {
100100
publish {
101101
groupId = 'com.aspose'
102102
artifactId = 'aspose-cloud-pdf-android'
103-
publishVersion = '24.10.0'
103+
publishVersion = '24.11.0'
104104
desc = 'Aspose.PDF Cloud is a REST API for creating and editing PDF files. It can also be used to convert PDF files to different formats like DOC, HTML, XPS, TIFF and many more. Aspose.PDF Cloud gives you control: create PDFs from scratch or from HTML, XML, template, database, XPS or an image. Render PDFs to image formats such as JPEG, PNG, GIF, BMP, TIFF and many others. Aspose.PDF Cloud helps you manipulate elements of a PDF file like text, annotations, watermarks, signatures, bookmarks, stamps and so on. Its REST API also allows you to manage PDF pages by using features like merging, splitting, and inserting. Add images to a PDF file or convert PDF pages to images.'
105105
licences = ['MIT']
106106
website = 'https://products.aspose.cloud/pdf/cloud'

sdk/docs/DocRecognitionMode.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Allows to control how a PDF document is converted into a word processing documen
77
------------ | ------------
88
**Textbox** | This mode is fast and good for maximally preserving original look of the PDF file, but editability of the resulting document could be limited.Every visually grouped block of text int the original PDF file is converted into a textbox in the resulting document. This achieves maximal resemblance of the output document to the original PDF file. The output document will look good, but it will consist entirely of textboxes and it could makes further editing of the document in Microsoft Word quite hard.This is the default mode.
99
**Flow** | Full recognition mode, the engine performs grouping and multi-level analysis to restore the original document author's intent and produce a maximally editable document. The downside is that the output document might look different from the original PDF file.
10+
**EnhancedFlow** | An alternative Flow mode that supports the recognition of tables.
1011

1112

1213
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

sdk/docs/PdfApi.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Method | HTTP request | Description
9595
[**getImageExtractAsPng**](PdfApi.md#getImageExtractAsPng) | **GET** /pdf/\{name}/images/\{imageId}/extract/png | Extract document image in PNG format
9696
[**getImageExtractAsTiff**](PdfApi.md#getImageExtractAsTiff) | **GET** /pdf/\{name}/images/\{imageId}/extract/tiff | Extract document image in TIFF format
9797
[**getImages**](PdfApi.md#getImages) | **GET** /pdf/\{name}/pages/\{pageNumber}/images | Read document images.
98+
[**getImagesExtractSvg**](PdfApi.md#getImagesExtractSvg) | **GET** /pdf/\{name}/pages/\{pageNumber}/images/extract/svg | Extract SVG images from document page.
9899
[**getImportFieldsFromFdfInStorage**](PdfApi.md#getImportFieldsFromFdfInStorage) | **GET** /pdf/\{name}/import/fdf | Update fields from FDF file in storage.
99100
[**getImportFieldsFromXfdfInStorage**](PdfApi.md#getImportFieldsFromXfdfInStorage) | **GET** /pdf/\{name}/import/xfdf | Update fields from XFDF file in storage.
100101
[**getImportFieldsFromXmlInStorage**](PdfApi.md#getImportFieldsFromXmlInStorage) | **GET** /pdf/\{name}/import/xml | Import from XML file (located on storage) to PDF format and return resulting file in response.
@@ -2530,6 +2531,31 @@ Name | Type | Description | Notes
25302531

25312532
[**ImagesResponse**](ImagesResponse.md)
25322533

2534+
### HTTP request headers
2535+
2536+
- **Content-Type**: application/json
2537+
- **Accept**: application/json
2538+
2539+
<a name="getImagesExtractSvg"></a>
2540+
# **getImagesExtractSvg**
2541+
> SvgImages getImagesExtractSvg(name, pageNumber, storage, folder, passBase64)
2542+
2543+
Extract SVG images from document page.
2544+
2545+
### Parameters
2546+
2547+
Name | Type | Description | Notes
2548+
------------- | ------------- | ------------- | -------------
2549+
**name** | **String**| The document name. |
2550+
**pageNumber** | **Integer**| The page number. |
2551+
**storage** | **String**| The document storage. | [optional]
2552+
**folder** | **String**| The document folder. | [optional]
2553+
**passBase64** | **String**| The password (Base64). | [optional]
2554+
2555+
### Return type
2556+
2557+
[**SvgImages**](SvgImages.md)
2558+
25332559
### HTTP request headers
25342560

25352561
- **Content-Type**: application/json
@@ -3818,7 +3844,7 @@ Name | Type | Description | Notes
38183844
**imageResolutionX** | **Integer**| Image resolution X. | [optional]
38193845
**imageResolutionY** | **Integer**| Image resolution Y. | [optional]
38203846
**maxDistanceBetweenTextLines** | **Double**| Max distance between text lines. | [optional]
3821-
**mode** | **String**| Allows to control how a PDF document is converted into a word processing document. | [optional] [enum: Textbox, Flow]
3847+
**mode** | **String**| Allows to control how a PDF document is converted into a word processing document. | [optional] [enum: Textbox, Flow, EnhancedFlow]
38223848
**recognizeBullets** | **Boolean**| Recognize bullets. | [optional]
38233849
**relativeHorizontalProximity** | **Double**| Relative horizontal proximity. | [optional]
38243850
**folder** | **String**| The document folder. | [optional]
@@ -8047,7 +8073,7 @@ Name | Type | Description | Notes
80478073
**imageResolutionX** | **Integer**| Image resolution X. | [optional]
80488074
**imageResolutionY** | **Integer**| Image resolution Y. | [optional]
80498075
**maxDistanceBetweenTextLines** | **Double**| Max distance between text lines. | [optional]
8050-
**mode** | **String**| Allows to control how a PDF document is converted into a word processing document. | [optional] [enum: Textbox, Flow]
8076+
**mode** | **String**| Allows to control how a PDF document is converted into a word processing document. | [optional] [enum: Textbox, Flow, EnhancedFlow]
80518077
**recognizeBullets** | **Boolean**| Recognize bullets. | [optional]
80528078
**relativeHorizontalProximity** | **Double**| Relative horizontal proximity. | [optional]
80538079
**storage** | **String**| The document storage. | [optional]
@@ -8418,7 +8444,7 @@ Name | Type | Description | Notes
84188444
**imageResolutionX** | **Integer**| Image resolution X. | [optional]
84198445
**imageResolutionY** | **Integer**| Image resolution Y. | [optional]
84208446
**maxDistanceBetweenTextLines** | **Double**| Max distance between text lines. | [optional]
8421-
**mode** | **String**| Allows to control how a PDF document is converted into a word processing document. | [optional] [enum: Textbox, Flow]
8447+
**mode** | **String**| Allows to control how a PDF document is converted into a word processing document. | [optional] [enum: Textbox, Flow, EnhancedFlow]
84228448
**recognizeBullets** | **Boolean**| Recognize bullets. | [optional]
84238449
**relativeHorizontalProximity** | **Double**| Relative horizontal proximity. | [optional]
84248450
**folder** | **String**| The document folder. | [optional]

sdk/docs/SvgImages.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
# SvgImages
3+
SvgImages class
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**list** | **List&lt;String&gt;** | List of SVG images | [optional]
9+
**code** | **Integer** | Response status code. |
10+
**status** | **String** | Response status. | [optional]
11+
12+
13+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
14+
15+

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", "24.10.0");
97+
addDefaultHeader("x-aspose-client-version", "24.11.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: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
import com.aspose.asposecloudpdfandroid.model.StrikeOutAnnotation;
158158
import com.aspose.asposecloudpdfandroid.model.StrikeOutAnnotationResponse;
159159
import com.aspose.asposecloudpdfandroid.model.StrikeOutAnnotationsResponse;
160+
import com.aspose.asposecloudpdfandroid.model.SvgImages;
160161
import com.aspose.asposecloudpdfandroid.model.Table;
161162
import com.aspose.asposecloudpdfandroid.model.TableRecognizedResponse;
162163
import com.aspose.asposecloudpdfandroid.model.TablesRecognizedResponse;
@@ -14187,6 +14188,170 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1418714188
apiClient.executeAsync(call, localVarReturnType, callback);
1418814189
return call;
1418914190
}
14191+
/**
14192+
* Build call for getImagesExtractSvg
14193+
* @param name The document name. (required)
14194+
* @param pageNumber The page number. (required)
14195+
* @param storage The document storage. (optional)
14196+
* @param folder The document folder. (optional)
14197+
* @param passBase64 The password (Base64). (optional)
14198+
* @param progressListener Progress listener
14199+
* @param progressRequestListener Progress request listener
14200+
* @return Call to execute
14201+
* @throws ApiException If fail to serialize the request body object
14202+
*/
14203+
public com.squareup.okhttp.Call getImagesExtractSvgCall(String name, Integer pageNumber, String storage, String folder, String passBase64, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
14204+
Object localVarPostBody = null;
14205+
14206+
// create path and map variables
14207+
String localVarPath = "/pdf/{name}/pages/{pageNumber}/images/extract/svg"
14208+
.replaceAll("\\{" + "name" + "\\}", apiClient.escapePathSegmentString(name.toString()))
14209+
.replaceAll("\\{" + "pageNumber" + "\\}", apiClient.escapePathSegmentString(pageNumber.toString()));
14210+
14211+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
14212+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
14213+
if (storage != null)
14214+
localVarQueryParams.addAll(apiClient.parameterToPair("storage", storage));
14215+
if (folder != null)
14216+
localVarQueryParams.addAll(apiClient.parameterToPair("folder", folder));
14217+
if (passBase64 != null)
14218+
localVarQueryParams.addAll(apiClient.parameterToPair("passBase64", passBase64));
14219+
14220+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
14221+
14222+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
14223+
14224+
final String[] localVarAccepts = {
14225+
"application/json"
14226+
};
14227+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
14228+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
14229+
14230+
final String[] localVarContentTypes = {
14231+
"application/json"
14232+
};
14233+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
14234+
localVarHeaderParams.put("Content-Type", localVarContentType);
14235+
14236+
if(progressListener != null) {
14237+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
14238+
@Override
14239+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
14240+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
14241+
return originalResponse.newBuilder()
14242+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
14243+
.build();
14244+
}
14245+
});
14246+
}
14247+
14248+
String[] localVarAuthNames = new String[] { "JWT" };
14249+
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
14250+
}
14251+
14252+
@SuppressWarnings("rawtypes")
14253+
private com.squareup.okhttp.Call getImagesExtractSvgValidateBeforeCall(String name, Integer pageNumber, String storage, String folder, String passBase64, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
14254+
14255+
// verify the required parameter 'name' is set
14256+
if (name == null) {
14257+
throw new ApiException("Missing the required parameter 'name' when calling getImagesExtractSvg(Async)");
14258+
}
14259+
14260+
// verify the required parameter 'pageNumber' is set
14261+
if (pageNumber == null) {
14262+
throw new ApiException("Missing the required parameter 'pageNumber' when calling getImagesExtractSvg(Async)");
14263+
}
14264+
14265+
14266+
com.squareup.okhttp.Call call = getImagesExtractSvgCall(name, pageNumber, storage, folder, passBase64, progressListener, progressRequestListener);
14267+
return call;
14268+
14269+
}
14270+
14271+
/**
14272+
* Extract SVG images from document page.
14273+
*
14274+
* @param name The document name. (required)
14275+
* @param pageNumber The page number. (required)
14276+
* @param storage The document storage. (optional)
14277+
* @param folder The document folder. (optional)
14278+
* @param passBase64 The password (Base64). (optional)
14279+
* @return SvgImages
14280+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
14281+
*/
14282+
public SvgImages getImagesExtractSvg(String name, Integer pageNumber, String storage, String folder, String passBase64) throws ApiException {
14283+
try
14284+
{
14285+
ApiResponse<SvgImages> resp = getImagesExtractSvgWithHttpInfo(name, pageNumber, storage, folder, passBase64);
14286+
return resp.getData();
14287+
}
14288+
catch (ApiException ex)
14289+
{
14290+
if (ex.getCode() == 401)
14291+
{
14292+
apiClient.requestToken();
14293+
ApiResponse<SvgImages> resp = getImagesExtractSvgWithHttpInfo(name, pageNumber, storage, folder, passBase64);
14294+
return resp.getData();
14295+
}
14296+
throw ex;
14297+
}
14298+
}
14299+
14300+
/**
14301+
* Extract SVG images from document page.
14302+
*
14303+
* @param name The document name. (required)
14304+
* @param pageNumber The page number. (required)
14305+
* @param storage The document storage. (optional)
14306+
* @param folder The document folder. (optional)
14307+
* @param passBase64 The password (Base64). (optional)
14308+
* @return ApiResponse&lt;SvgImages&gt;
14309+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
14310+
*/
14311+
public ApiResponse<SvgImages> getImagesExtractSvgWithHttpInfo(String name, Integer pageNumber, String storage, String folder, String passBase64) throws ApiException {
14312+
com.squareup.okhttp.Call call = getImagesExtractSvgValidateBeforeCall(name, pageNumber, storage, folder, passBase64, null, null);
14313+
Type localVarReturnType = new TypeToken<SvgImages>(){}.getType();
14314+
return apiClient.execute(call, localVarReturnType);
14315+
}
14316+
14317+
/**
14318+
* Extract SVG images from document page. (asynchronously)
14319+
*
14320+
* @param name The document name. (required)
14321+
* @param pageNumber The page number. (required)
14322+
* @param storage The document storage. (optional)
14323+
* @param folder The document folder. (optional)
14324+
* @param passBase64 The password (Base64). (optional)
14325+
* @param callback The callback to be executed when the API call finishes
14326+
* @return The request call
14327+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
14328+
*/
14329+
public com.squareup.okhttp.Call getImagesExtractSvgAsync(String name, Integer pageNumber, String storage, String folder, String passBase64, final ApiCallback<SvgImages> callback) throws ApiException {
14330+
14331+
ProgressResponseBody.ProgressListener progressListener = null;
14332+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
14333+
14334+
if (callback != null) {
14335+
progressListener = new ProgressResponseBody.ProgressListener() {
14336+
@Override
14337+
public void update(long bytesRead, long contentLength, boolean done) {
14338+
callback.onDownloadProgress(bytesRead, contentLength, done);
14339+
}
14340+
};
14341+
14342+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
14343+
@Override
14344+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
14345+
callback.onUploadProgress(bytesWritten, contentLength, done);
14346+
}
14347+
};
14348+
}
14349+
14350+
com.squareup.okhttp.Call call = getImagesExtractSvgValidateBeforeCall(name, pageNumber, storage, folder, passBase64, progressListener, progressRequestListener);
14351+
Type localVarReturnType = new TypeToken<SvgImages>(){}.getType();
14352+
apiClient.executeAsync(call, localVarReturnType, callback);
14353+
return call;
14354+
}
1419014355
/**
1419114356
* Build call for getImportFieldsFromFdfInStorage
1419214357
* @param name The document name. (required)

sdk/src/main/java/com/aspose/asposecloudpdfandroid/model/DocRecognitionMode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public enum DocRecognitionMode {
4040

4141
TEXTBOX("Textbox"),
4242

43-
FLOW("Flow");
43+
FLOW("Flow"),
44+
45+
ENHANCEDFLOW("EnhancedFlow");
4446

4547
private String value;
4648

0 commit comments

Comments
 (0)