Skip to content

Commit f1001ff

Browse files
Merge pull request #18 from kaferi/master
Update to v20.4
2 parents ac67551 + 48f0f6a commit f1001ff

File tree

8 files changed

+71
-29
lines changed

8 files changed

+71
-29
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aspose.PDF Cloud
22
- API version: 3.0
3-
- Package version: 20.2.0
3+
- Package version: 20.4.0
44

55
[Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of PDF documents in the cloud.
66

@@ -459,6 +459,7 @@ Class | Method | HTTP request | Description
459459
- [HorizontalAlignment](docs/HorizontalAlignment.md)
460460
- [HtmlDocumentType](docs/HtmlDocumentType.md)
461461
- [HtmlMarkupGenerationModes](docs/HtmlMarkupGenerationModes.md)
462+
- [ImageFragment](docs/ImageFragment.md)
462463
- [ImageSrcType](docs/ImageSrcType.md)
463464
- [ImageTemplate](docs/ImageTemplate.md)
464465
- [ImageTemplatesRequest](docs/ImageTemplatesRequest.md)

cell.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ type Cell struct {
3232
BackgroundColor *Color `json:"BackgroundColor,omitempty"`
3333
// Gets or sets the background image file.
3434
BackgroundImageFile string `json:"BackgroundImageFile,omitempty"`
35+
// Gets or sets path of the background image file from storage.
36+
BackgroundImageStorageFile string `json:"BackgroundImageStorageFile,omitempty"`
3537
// Gets or sets the alignment.
3638
Alignment HorizontalAlignment `json:"Alignment,omitempty"`
3739
// Gets or sets the default cell text state.
@@ -48,4 +50,8 @@ type Cell struct {
4850
RowSpan int32 `json:"RowSpan,omitempty"`
4951
// Gets or sets the column width.
5052
Width float64 `json:"Width,omitempty"`
53+
// Gets or sets Html fragment.
54+
HtmlFragment string `json:"HtmlFragment,omitempty"`
55+
// Gets or sets ImageFragment list.
56+
Images []ImageFragment `json:"Images,omitempty"`
5157
}

docs/Cell.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**Border** | [***BorderInfo**](BorderInfo.md) | Gets or sets the border. | [optional] [default to null]
1010
**BackgroundColor** | [***Color**](Color.md) | Gets or sets the background color. | [optional] [default to null]
1111
**BackgroundImageFile** | **string** | Gets or sets the background image file. | [optional] [default to null]
12+
**BackgroundImageStorageFile** | **string** | Gets or sets path of the background image file from storage. | [optional] [default to null]
1213
**Alignment** | [***HorizontalAlignment**](HorizontalAlignment.md) | Gets or sets the alignment. | [optional] [default to null]
1314
**DefaultCellTextState** | [***TextState**](TextState.md) | Gets or sets the default cell text state. | [optional] [default to null]
1415
**Paragraphs** | [**[]TextRect**](TextRect.md) | Gets or sets the cell's formatted text. | [optional] [default to null]
@@ -17,6 +18,8 @@ Name | Type | Description | Notes
1718
**ColSpan** | **int32** | Gets or sets the column span. | [optional] [default to null]
1819
**RowSpan** | **int32** | Gets or sets the row span. | [optional] [default to null]
1920
**Width** | **float64** | Gets or sets the column width. | [optional] [default to null]
21+
**HtmlFragment** | **string** | Gets or sets Html fragment. | [optional] [default to null]
22+
**Images** | [**[]ImageFragment**](ImageFragment.md) | Gets or sets ImageFragment list. | [optional] [default to null]
2023

2124
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)[[View Source]](../cell.go)
2225

docs/ImageFragment.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ImageFragment
2+
Represents Image Fragment DTO.
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**ImageFile** | **string** | Gets or sets full storage path of image. | [default to null]
8+
**FixWidth** | **float64** | Gets or sets fix width of the image. | [optional] [default to null]
9+
**FixHeight** | **float64** | Gets or sets fix height of the image. | [optional] [default to null]
10+
**HorizontalAlignment** | [***HorizontalAlignment**](HorizontalAlignment.md) | Gets or sets horizontal alignment of the image. | [optional] [default to null]
11+
**VerticalAlignment** | [***VerticalAlignment**](VerticalAlignment.md) | Gets or sets vertical alignment of the image. | [optional] [default to null]
12+
**ImageScale** | **float64** | Gets or sets ImageScale of the image. | [optional] [default to null]
13+
**Margin** | [***MarginInfo**](MarginInfo.md) | Gets or sets Margin of the image. | [optional] [default to null]
14+
15+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)[[View Source]](../image_fragment.go)
16+
17+

docs/PdfApi.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5109,7 +5109,6 @@ Optional parameters are passed through a map[string]interface{}.
51095109
Name | Type | Description | Notes
51105110
------------- | ------------- | ------------- | -------------
51115111
**name** | **string**| The document name. |
5112-
**pagesCount** | **int32**| Pages count. |
51135112
**folder** | **string**| The document folder. |
51145113
**storage** | **string**| The document storage. |
51155114

@@ -10422,7 +10421,6 @@ Optional parameters are passed through a map[string]interface{}.
1042210421
Name | Type | Description | Notes
1042310422
------------- | ------------- | ------------- | -------------
1042410423
**outPath** | **string**| Full resulting filename (ex. /folder1/folder2/result.tex) |
10425-
**pagesCount** | **int32**| Pages count. |
1042610424
**storage** | **string**| The document storage. |
1042710425
**file** | ***os.File**| A file to be converted. |
1042810426

@@ -10899,7 +10897,6 @@ Name | Type | Description | Notes
1089910897
------------- | ------------- | ------------- | -------------
1090010898
**name** | **string**| The document name. |
1090110899
**outPath** | **string**| Full resulting filename (ex. /folder1/folder2/result.tex) |
10902-
**pagesCount** | **int32**| Pages count. |
1090310900
**folder** | **string**| The document folder. |
1090410901
**storage** | **string**| The document storage. |
1090510902

image_fragment.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
*
3+
* Copyright (c) 2020 Aspose.PDF Cloud
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18+
* SOFTWARE.
19+
*
20+
*/
21+
package asposepdfcloud
22+
23+
// Represents Image Fragment DTO.
24+
type ImageFragment struct {
25+
// Gets or sets full storage path of image.
26+
ImageFile string `json:"ImageFile"`
27+
// Gets or sets fix width of the image.
28+
FixWidth float64 `json:"FixWidth,omitempty"`
29+
// Gets or sets fix height of the image.
30+
FixHeight float64 `json:"FixHeight,omitempty"`
31+
// Gets or sets horizontal alignment of the image.
32+
HorizontalAlignment HorizontalAlignment `json:"HorizontalAlignment,omitempty"`
33+
// Gets or sets vertical alignment of the image.
34+
VerticalAlignment VerticalAlignment `json:"VerticalAlignment,omitempty"`
35+
// Gets or sets ImageScale of the image.
36+
ImageScale float64 `json:"ImageScale,omitempty"`
37+
// Gets or sets Margin of the image.
38+
Margin *MarginInfo `json:"Margin,omitempty"`
39+
}

pdf_api.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11774,7 +11774,6 @@ func (a *PdfApiService) GetPdfInStorageToHtml(name string, localVarOptionals map
1177411774
/* PdfApiService Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content
1177511775
@param name The document name.
1177611776
@param optional (nil or map[string]interface{}) with one or more of:
11777-
@param "pagesCount" (int32) Pages count.
1177811777
@param "folder" (string) The document folder.
1177911778
@param "storage" (string) The document storage.
1178011779
@return []byte*/
@@ -11795,19 +11794,13 @@ func (a *PdfApiService) GetPdfInStorageToLaTeX(name string, localVarOptionals ma
1179511794
localVarQueryParams := _url.Values{}
1179611795
localVarFormParams := _url.Values{}
1179711796

11798-
if err := typeCheckParameter(localVarOptionals["pagesCount"], "int32", "pagesCount"); err != nil {
11799-
return successPayload, nil, err
11800-
}
1180111797
if err := typeCheckParameter(localVarOptionals["folder"], "string", "folder"); err != nil {
1180211798
return successPayload, nil, err
1180311799
}
1180411800
if err := typeCheckParameter(localVarOptionals["storage"], "string", "storage"); err != nil {
1180511801
return successPayload, nil, err
1180611802
}
1180711803

11808-
if localVarTempParam, localVarOk := localVarOptionals["pagesCount"].(int32); localVarOk {
11809-
localVarQueryParams.Add("pagesCount", parameterToString(localVarTempParam, ""))
11810-
}
1181111804
if localVarTempParam, localVarOk := localVarOptionals["folder"].(string); localVarOk {
1181211805
localVarQueryParams.Add("folder", parameterToString(localVarTempParam, ""))
1181311806
}
@@ -25179,7 +25172,6 @@ func (a *PdfApiService) PutPdfInRequestToHtml(outPath string, localVarOptionals
2517925172
/* PdfApiService Converts PDF document (in request content) to LaTeX format and uploads resulting file to storage.
2518025173
@param outPath Full resulting filename (ex. /folder1/folder2/result.tex)
2518125174
@param optional (nil or map[string]interface{}) with one or more of:
25182-
@param "pagesCount" (int32) Pages count.
2518325175
@param "storage" (string) The document storage.
2518425176
@param "file" (*os.File) A file to be converted.
2518525177
@return AsposeResponse*/
@@ -25199,17 +25191,11 @@ func (a *PdfApiService) PutPdfInRequestToLaTeX(outPath string, localVarOptionals
2519925191
localVarQueryParams := _url.Values{}
2520025192
localVarFormParams := _url.Values{}
2520125193

25202-
if err := typeCheckParameter(localVarOptionals["pagesCount"], "int32", "pagesCount"); err != nil {
25203-
return successPayload, nil, err
25204-
}
2520525194
if err := typeCheckParameter(localVarOptionals["storage"], "string", "storage"); err != nil {
2520625195
return successPayload, nil, err
2520725196
}
2520825197

2520925198
localVarQueryParams.Add("outPath", parameterToString(outPath, ""))
25210-
if localVarTempParam, localVarOk := localVarOptionals["pagesCount"].(int32); localVarOk {
25211-
localVarQueryParams.Add("pagesCount", parameterToString(localVarTempParam, ""))
25212-
}
2521325199
if localVarTempParam, localVarOk := localVarOptionals["storage"].(string); localVarOk {
2521425200
localVarQueryParams.Add("storage", parameterToString(localVarTempParam, ""))
2521525201
}
@@ -26674,7 +26660,6 @@ func (a *PdfApiService) PutPdfInStorageToHtml(name string, outPath string, local
2667426660
@param name The document name.
2667526661
@param outPath Full resulting filename (ex. /folder1/folder2/result.tex)
2667626662
@param optional (nil or map[string]interface{}) with one or more of:
26677-
@param "pagesCount" (int32) Pages count.
2667826663
@param "folder" (string) The document folder.
2667926664
@param "storage" (string) The document storage.
2668026665
@return AsposeResponse*/
@@ -26695,9 +26680,6 @@ func (a *PdfApiService) PutPdfInStorageToLaTeX(name string, outPath string, loca
2669526680
localVarQueryParams := _url.Values{}
2669626681
localVarFormParams := _url.Values{}
2669726682

26698-
if err := typeCheckParameter(localVarOptionals["pagesCount"], "int32", "pagesCount"); err != nil {
26699-
return successPayload, nil, err
26700-
}
2670126683
if err := typeCheckParameter(localVarOptionals["folder"], "string", "folder"); err != nil {
2670226684
return successPayload, nil, err
2670326685
}
@@ -26706,9 +26688,6 @@ func (a *PdfApiService) PutPdfInStorageToLaTeX(name string, outPath string, loca
2670626688
}
2670726689

2670826690
localVarQueryParams.Add("outPath", parameterToString(outPath, ""))
26709-
if localVarTempParam, localVarOk := localVarOptionals["pagesCount"].(int32); localVarOk {
26710-
localVarQueryParams.Add("pagesCount", parameterToString(localVarTempParam, ""))
26711-
}
2671226691
if localVarTempParam, localVarOk := localVarOptionals["folder"].(string); localVarOk {
2671326692
localVarQueryParams.Add("folder", parameterToString(localVarTempParam, ""))
2671426693
}

tables_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ func DrawTable() Table {
285285
// change properties on paragraph
286286
cell.Paragraphs[0].TextState = &textState
287287
cell.Paragraphs[0].TextState.ForegroundColor = &Color { A: int32(0xFF), R: int32(0), G: 0, B: int32(0xFF)}
288-
} else if (c == 4) {// change properties on paragraph AFTER first clearing and re-adding paragraphs
289-
cell.Paragraphs[0] = TextRect{ Text: "y" }
290-
cell.Paragraphs[0].TextState = &textState
291-
cell.Paragraphs[0].TextState.ForegroundColor = &Color { A: int32(0xFF), R: int32(0), G: 0, B: int32(0xFF)}
288+
} else if (c == 4) {
289+
// HTML Fragment
290+
cell.Paragraphs = nil
291+
cell.HtmlFragment = "<ul><li>First</li><li>Second</li></ul>"
292292
}
293293
row.Cells[c] = cell
294294

0 commit comments

Comments
 (0)